OSDN Git Service

[Refactor] #37353 コメント整理 / Refactor comments.
authorDeskull <deskull@users.sourceforge.jp>
Sun, 2 Dec 2018 14:56:57 +0000 (23:56 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sun, 2 Dec 2018 14:56:57 +0000 (23:56 +0900)
src/cave.c
src/cmd-pet.c
src/effects.c
src/grid.c

index 5d33968..2dc97dc 100644 (file)
@@ -4429,11 +4429,8 @@ void wiz_lite(bool ninja)
                }
        }
 
-       /* Update the monsters */
        p_ptr->update |= (PU_MONSTERS);
-
        p_ptr->redraw |= (PR_MAP);
-
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 
        if (p_ptr->special_defense & NINJA_S_STEALTH)
@@ -4496,17 +4493,10 @@ void wiz_dark(void)
        /* Forget travel route when we have forgotten map */
        forget_travel_flow();
 
-       /* Mega-Hack -- Forget the view and lite */
        p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
-
-       /* Update the view and lite */
        p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
-
-       /* Update the monsters */
        p_ptr->update |= (PU_MONSTERS);
-
        p_ptr->redraw |= (PR_MAP);
-
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
 
index 6c6f549..7fe524c 100644 (file)
@@ -264,7 +264,6 @@ void do_cmd_pet_dismiss(void)
 
                                p_ptr->riding = 0;
 
-                               /* Update the monsters */
                                p_ptr->update |= (PU_BONUS | PU_MONSTERS);
                                p_ptr->redraw |= (PR_EXTRA | PR_UHEALTH);
                        }
@@ -414,12 +413,8 @@ bool do_riding(bool force)
 
        /* Mega-Hack -- Forget the view and lite */
        p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
-
-       /* Update the monsters */
        p_ptr->update |= (PU_BONUS);
-
        p_ptr->redraw |= (PR_MAP | PR_EXTRA);
-
        p_ptr->redraw |= (PR_UHEALTH);
 
        /* Move the player */
index caf759a..dc21c59 100644 (file)
@@ -1554,8 +1554,6 @@ bool set_tim_esp(TIME_EFFECT v, bool do_dec)
 
        /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Update the monsters */
        p_ptr->update |= (PU_MONSTERS);
 
        /* Handle stuff */
index 5f2ebac..81aadab 100644 (file)
@@ -96,36 +96,28 @@ void place_random_stairs(POSITION y, POSITION x)
        if (!is_floor_grid(c_ptr) || c_ptr->o_idx) return;
 
        /* Town */
-       if (!dun_level)
-               up_stairs = FALSE;
+       if (!dun_level) up_stairs = FALSE;
 
        /* Ironman */
-       if (ironman_downward)
-               up_stairs = FALSE;
+       if (ironman_downward) up_stairs = FALSE;
 
        /* Bottom */
-       if (dun_level >= d_info[dungeon_type].maxdepth)
-               down_stairs = FALSE;
+       if (dun_level >= d_info[dungeon_type].maxdepth) down_stairs = FALSE;
 
        /* Quest-level */
-       if (quest_number(dun_level) && (dun_level > 1))
-               down_stairs = FALSE;
+       if (quest_number(dun_level) && (dun_level > 1)) down_stairs = FALSE;
 
        /* We can't place both */
        if (down_stairs && up_stairs)
        {
                /* Choose a staircase randomly */
-               if (randint0(100) < 50)
-                       up_stairs = FALSE;
-               else
-                       down_stairs = FALSE;
+               if (randint0(100) < 50) up_stairs = FALSE;
+               else down_stairs = FALSE;
        }
 
        /* Place the stairs */
-       if (up_stairs)
-               place_up_stairs(y, x);
-       else if (down_stairs)
-               place_down_stairs(y, x);
+       if (up_stairs) place_up_stairs(y, x);
+       else if (down_stairs) place_down_stairs(y, x);
 }
 
 /*!