OSDN Git Service

[Refactor] #37353 update_stuff() の直接呼出しを抑止。 / Forbid call of update_stuff() except...
authorDeskull <deskull@users.sourceforge.jp>
Sun, 16 Dec 2018 01:49:24 +0000 (10:49 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 16 Dec 2018 01:49:24 +0000 (10:49 +0900)
src/birth.c
src/cmd5.c
src/dungeon.c
src/files.c
src/melee1.c
src/monster-status.c
src/spells1.c
src/spells2.c
src/wizard2.c

index 33bd657..861110e 100644 (file)
@@ -4580,13 +4580,9 @@ static bool player_birth_aux(void)
                {
                        /* Calculate the bonuses and hitpoints */
                        p_ptr->update |= (PU_BONUS | PU_HP);
+                       handle_stuff();
 
-                       update_stuff();
-
-                       /* Fully healed */
                        p_ptr->chp = p_ptr->mhp;
-
-                       /* Fully rested */
                        p_ptr->csp = p_ptr->msp;
 
                        /* Display the player */
@@ -4778,7 +4774,7 @@ static bool ask_quick_start(void)
        /* Calculate the bonuses and hitpoints */
        p_ptr->update |= (PU_BONUS | PU_HP);
 
-       update_stuff();
+       handle_stuff();
 
        /* Fully healed */
        p_ptr->chp = p_ptr->mhp;
index 0a5b37c..68e016c 100644 (file)
@@ -878,7 +878,7 @@ void do_cmd_study(void)
 #
        /* Update Study */
        p_ptr->update |= (PU_SPELLS);
-       update_stuff();
+       handle_stuff();
 
        /* Redraw object recall */
        p_ptr->window |= (PW_OBJECT);
index 5f39ee1..f29b7c4 100644 (file)
@@ -5756,7 +5756,7 @@ void play_game(bool new_game)
 
                p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
 
-               update_stuff();
+               handle_stuff();
 
                p_ptr->is_dead = TRUE;
 
index 6f5d75f..26937c7 100644 (file)
@@ -6137,7 +6137,7 @@ void do_cmd_save_game(int is_autosave)
        /* HACK -- don't get sanity blast on updating view */
        is_loading_now = FALSE;
 
-       update_stuff();
+       handle_stuff();
 
        /* Initialize monster process */
        mproc_init();
index 4af0fa1..a3b190d 100644 (file)
@@ -2012,7 +2012,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
                                                if (apply_disenchant(0))
                                                {
                                                        /* Hack -- Update AC */
-                                                       update_stuff();
+                                                       handle_stuff();
                                                        obvious = TRUE;
                                                }
                                        }
@@ -2320,7 +2320,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
                                        obvious = TRUE;
                                        msg_print(_("酸を浴びせられた!", "You are covered in acid!"));
                                        get_damage += acid_dam(damage, ddesc, -1, FALSE);
-                                       update_stuff();
+                                       handle_stuff();
                                        update_smart_learn(m_idx, DRS_ACID);
                                        break;
                                }
index ba5c099..e3ca658 100644 (file)
@@ -683,7 +683,7 @@ bool process_the_world(int num, MONSTER_IDX who, bool vs_player)
                reset_target(m_ptr);
 
                if (p_ptr->notice) notice_stuff();
-               if (p_ptr->update) update_stuff();
+               if (p_ptr->update) handle_stuff();
                if (p_ptr->redraw) redraw_stuff();
                if (p_ptr->window) window_stuff();
 
index 141ee26..ef1958f 100644 (file)
@@ -7387,7 +7387,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
 
 
        /* Update stuff if needed */
-       if (p_ptr->update) update_stuff();
+       if (p_ptr->update) handle_stuff();
 
 
        if (flg & PROJECT_KILL)
@@ -7430,7 +7430,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
        }
 
        /* Update stuff if needed */
-       if (p_ptr->update) update_stuff();
+       if (p_ptr->update) handle_stuff();
 
        /* Check objects */
        if (flg & (PROJECT_ITEM))
index 52d9b0c..35e95ec 100644 (file)
@@ -4798,7 +4798,7 @@ bool_hack life_stream(bool_hack message, bool_hack virtue)
        (void)set_cut(0);
        (void)restore_all_status();
        (void)set_shero(0, TRUE);
-       update_stuff();
+       handle_stuff();
        hp_player(5000);
 
        return TRUE;
index 94514ec..43b0282 100644 (file)
@@ -345,7 +345,7 @@ static void do_cmd_wiz_reset_class(void)
        /* {.} and {$} effect p_ptr->warning and TRC_TELEPORT_SELF */
        p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
 
-       update_stuff();
+       handle_stuff();
 }