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 | 7bf0a5a464c417cbe6d746a0deabd9538d66d4b1 (patch) | |
tree | 770fe3d81861d8555c3503d2fe561bdceca1d0e8 /src | |
parent | 8ef7443e887958060d7a77b3750f495b592eb7b3 (diff) |
Remove player_type::preserve field
It redundantly duplicates the value of the 'preserve' option,
and since the options are saved along with the character we don't
actually need it.
Diffstat (limited to 'src')
-rw-r--r-- | src/birth.cc | 3 | ||||
-rw-r--r-- | src/files.cc | 4 | ||||
-rw-r--r-- | src/generate.cc | 2 | ||||
-rw-r--r-- | src/loadsave.cc | 1 | ||||
-rw-r--r-- | src/monster2.cc | 2 | ||||
-rw-r--r-- | src/object2.cc | 2 | ||||
-rw-r--r-- | src/player_type.hpp | 1 |
7 files changed, 6 insertions, 9 deletions
diff --git a/src/birth.cc b/src/birth.cc index 948d1c37..e581d8f0 100644 --- a/src/birth.cc +++ b/src/birth.cc @@ -2139,8 +2139,7 @@ static bool_ player_birth_aux_ask() } } - /* Set birth options: preserve, astral */ - p_ptr->preserve = preserve; + /* Is the player an "astral" being? */ p_ptr->astral = (race_flags_p(PR_ASTRAL)) ? TRUE : FALSE; /* diff --git a/src/files.cc b/src/files.cc index 8d489d0c..1f0d72d9 100644 --- a/src/files.cc +++ b/src/files.cc @@ -2662,7 +2662,7 @@ errr file_character(cptr name, bool_ full) else fprintf(fff, "\n Joke monsters: OFF"); - if (p_ptr->preserve) + if (preserve) fprintf(fff, "\n Preserve Mode: ON"); else fprintf(fff, "\n Preserve Mode: OFF"); @@ -4017,7 +4017,7 @@ static long total_points(void) if (!comp_death) comp_death = 1; - if (p_ptr->preserve) mult -= 1; /* Penalize preserve, maximize modes */ + if (preserve) mult -= 1; /* Penalize preserve, maximize modes */ mult -= 1; /* maximize pentalty, always on */ if (auto_scum) mult -= 4; if (small_levels) mult += ((always_small_level) ? 4 : 10); diff --git a/src/generate.cc b/src/generate.cc index 3f74bc24..8c02c58a 100644 --- a/src/generate.cc +++ b/src/generate.cc @@ -8508,7 +8508,7 @@ void generate_cave(void) else feeling = 10; /* Hack -- Have a special feeling sometimes */ - if (good_item_flag && !p_ptr->preserve) feeling = 1; + if (good_item_flag && !preserve) feeling = 1; /* It takes 1000 game turns for "feelings" to recharge */ if ((turn - old_turn) < 1000) feeling = 0; diff --git a/src/loadsave.cc b/src/loadsave.cc index 20182298..d6ca168a 100644 --- a/src/loadsave.cc +++ b/src/loadsave.cc @@ -792,7 +792,6 @@ static bool_ do_extra(ls_flag_t flag) do_bool(&p_ptr->black_breath, flag); do_bool(&fate_flag, flag); do_byte(&p_ptr->searching, flag); - do_byte(&p_ptr->preserve, flag); do_bool(&ambush_flag, flag); do_byte(&p_ptr->allow_one_death, flag); diff --git a/src/monster2.cc b/src/monster2.cc index 74380a25..4051a872 100644 --- a/src/monster2.cc +++ b/src/monster2.cc @@ -476,7 +476,7 @@ void delete_monster_idx(int i) /* Hack -- efficiency */ o_ptr->held_m_idx = 0; - if ( p_ptr->preserve ) + if (preserve) { /* Hack -- Preserve unknown artifacts */ if (artifact_p(o_ptr) && !object_known_p(o_ptr)) diff --git a/src/object2.cc b/src/object2.cc index ee001427..6185cc27 100644 --- a/src/object2.cc +++ b/src/object2.cc @@ -387,7 +387,7 @@ void wipe_o_list(void) if (!o_ptr->k_idx) continue; /* Mega-Hack -- preserve artifacts */ - if (!character_dungeon || p_ptr->preserve) + if (!character_dungeon || preserve) { /* Hack -- Preserve unknown artifacts */ if (artifact_p(o_ptr) && !object_known_p(o_ptr)) diff --git a/src/player_type.hpp b/src/player_type.hpp index 11eac14d..3130d859 100644 --- a/src/player_type.hpp +++ b/src/player_type.hpp @@ -47,7 +47,6 @@ struct player_type byte hitdie = 0; /* Hit dice (sides) */ u16b expfact = 0; /* Experience factor */ - byte preserve = 0; /* Preserve artifacts */ byte allow_one_death = 0; /* Blood of life */ s32b au = 0; /* Current Gold */ |