diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
commit | 7d8641b99e82d62ddb8753d7b50d6b9fcab91c41 (patch) | |
tree | 1471c3d8feec3c6994a4d2ee8ad67490b1c38707 | |
parent | 1e045ed09258e6c7fff63ef829759c6c8f06f441 (diff) |
Don't try to handle added skills on load
-rw-r--r-- | src/dungeon.cc | 14 | ||||
-rw-r--r-- | src/loadsave.cc | 32 | ||||
-rw-r--r-- | src/variable.cc | 1 | ||||
-rw-r--r-- | src/variable.hpp | 1 |
4 files changed, 6 insertions, 42 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc index 00bee6f4..bdb31fa1 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -5103,20 +5103,6 @@ void play_game() /* The dungeon is not ready */ character_dungeon = FALSE; } - else - { - int i; - - /* Init new skills to their defaults */ - for (i = old_max_s_idx; i < max_s_idx; i++) - { - s32b value = 0, mod = 0; - - compute_skills(&value, &mod, i); - - init_skill(value, mod, i); - } - } /* Process old character */ if (!new_game) diff --git a/src/loadsave.cc b/src/loadsave.cc index 5fb4bada..562a403b 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -601,37 +601,17 @@ static bool_ do_extra(ls_flag_t flag) do_u16b(&tmp16u, flag); - if ((flag == ls_flag_t::LOAD) && (tmp16u > MAX_SKILLS)) + if ((flag == ls_flag_t::LOAD) && (tmp16u != MAX_SKILLS)) { - quit("Too many skills"); + quit("Too few/many skills"); } - if (flag == ls_flag_t::SAVE) - { - old_max_s_idx = max_s_idx; - } - do_u16b(&old_max_s_idx, flag); - for (std::size_t i = 0; i < tmp16u; i++) { - if (i < old_max_s_idx) - { - do_s32b(&s_info[i].value, flag); - do_s32b(&s_info[i].mod, flag); - do_bool(&s_info[i].dev, flag); - do_bool(&s_info[i].hidden, flag); - } - else - { - // Skip extraneous entries - u32b tmp32u = 0; - s16b tmp16s = 0; - bool_ tmp8u = 0; - do_u32b(&tmp32u, flag); - do_s16b(&tmp16s, flag); - do_bool(&tmp8u, flag); - do_bool(&tmp8u, flag); - } + do_s32b(&s_info[i].value, flag); + do_s32b(&s_info[i].mod, flag); + do_bool(&s_info[i].dev, flag); + do_bool(&s_info[i].hidden, flag); } } diff --git a/src/variable.cc b/src/variable.cc index 827ee1af..51ec1333 100644 --- a/src/variable.cc +++ b/src/variable.cc @@ -683,7 +683,6 @@ wilderness_map **wild_map; /* * Maximum number of skills in s_info.txt */ -u16b old_max_s_idx = 0; u16b max_s_idx; /* diff --git a/src/variable.hpp b/src/variable.hpp index 52dbc455..3385bebd 100644 --- a/src/variable.hpp +++ b/src/variable.hpp @@ -210,7 +210,6 @@ extern bool_ (*get_obj_num_hook)(int k_idx); extern u16b max_wild_x; extern u16b max_wild_y; extern wilderness_map **wild_map; -extern u16b old_max_s_idx; extern u16b max_ab_idx; extern u16b max_s_idx; extern u16b max_r_idx; |