OSDN Git Service

[Fix] #38844 ambush_flag の player_type 入りが不完全だったのを修正。 Fix incompleted refactoring...
authordeskull <deskull@users.sourceforge.jp>
Wed, 13 Mar 2019 04:26:33 +0000 (13:26 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 13 Mar 2019 04:26:33 +0000 (13:26 +0900)
src/dungeon.c
src/load.c
src/save.c
src/util.c
src/wild.c

index 2680d8e..32ef7e9 100644 (file)
@@ -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);
index b932c67..3b9fca0 100644 (file)
@@ -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);
index e2bb0d8..0389198 100644 (file)
@@ -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);
index 3c2ed20..1191503 100644 (file)
@@ -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;
index d5c8f46..25509f8 100644 (file)
@@ -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 */