From d905dc395bccfa31f1c7973444e1c53a976e9d96 Mon Sep 17 00:00:00 2001 From: deskull Date: Wed, 13 Mar 2019 13:26:33 +0900 Subject: [PATCH] =?utf8?q?[Fix]=20#38844=20ambush=5Fflag=20=E3=81=AE=20pla?= =?utf8?q?yer=5Ftype=20=E5=85=A5=E3=82=8A=E3=81=8C=E4=B8=8D=E5=AE=8C?= =?utf8?q?=E5=85=A8=E3=81=A0=E3=81=A3=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE?= =?utf8?q?=E6=AD=A3=E3=80=82=20Fix=20incompleted=20refactoring=20of=20ambu?= =?utf8?q?sh=5Fflag.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/dungeon.c | 4 ++-- src/load.c | 4 ++-- src/save.c | 2 +- src/util.c | 2 +- src/wild.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dungeon.c b/src/dungeon.c index 2680d8eed..32ef7e9cb 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -3984,7 +3984,7 @@ static void process_command(void) { if (vanilla_town) break; - if (ambush_flag) + if (p_ptr->ambush_flag) { msg_print(_("襲撃から逃げるにはマップの端まで移動しなければならない。", "To flee the ambush you have to reach the edge of the map.")); break; @@ -5184,7 +5184,7 @@ static void dungeon(bool load_game) target_who = 0; pet_t_m_idx = 0; riding_t_m_idx = 0; - ambush_flag = FALSE; + p_ptr->ambush_flag = FALSE; /* Cancel the health bar */ health_track(0); diff --git a/src/load.c b/src/load.c index b932c6706..3b9fca059 100644 --- a/src/load.c +++ b/src/load.c @@ -3694,8 +3694,8 @@ static errr rd_savefile_new_aux(void) if (z_older_than(10, 3, 7)) p_ptr->wild_mode = FALSE; else rd_byte((byte *)&p_ptr->wild_mode); - if (z_older_than(10, 3, 7)) ambush_flag = FALSE; - else rd_byte((byte *)&ambush_flag); + if (z_older_than(10, 3, 7)) p_ptr->ambush_flag = FALSE; + else rd_byte((byte *)&p_ptr->ambush_flag); /* Size of the wilderness */ rd_s32b(&wild_x_size); diff --git a/src/save.c b/src/save.c index e2bb0d8ee..038919816 100644 --- a/src/save.c +++ b/src/save.c @@ -1410,7 +1410,7 @@ static bool wr_savefile_new(void) wr_s32b(p_ptr->wilderness_y); wr_byte(p_ptr->wild_mode); - wr_byte(ambush_flag); + wr_byte(p_ptr->ambush_flag); wr_s32b(current_world_ptr->max_wild_x); wr_s32b(current_world_ptr->max_wild_y); diff --git a/src/util.c b/src/util.c index 3c2ed201f..1191503fe 100644 --- a/src/util.c +++ b/src/util.c @@ -1681,7 +1681,7 @@ void select_floor_music(void) /* No sound */ if (!use_music) return; - if(ambush_flag) + if(p_ptr->ambush_flag) { play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_AMBUSH); return; diff --git a/src/wild.c b/src/wild.c index d5c8f46c6..25509f8aa 100644 --- a/src/wild.c +++ b/src/wild.c @@ -676,7 +676,7 @@ void wilderness_gen(void) (void)alloc_monster(generate_encounter ? 0 : 3, mode); } - if(generate_encounter) ambush_flag = TRUE; + if(generate_encounter) p_ptr->ambush_flag = TRUE; generate_encounter = FALSE; /* Fill the arrays of floors and walls in the good proportions */ -- 2.11.0