OSDN Git Service

CAVE_OBJECTに関する修正.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 22 Dec 2003 10:00:21 +0000 (10:00 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 22 Dec 2003 10:00:21 +0000 (10:00 +0000)
* cave.c 1.145のエンバグにより, cave_set_feat()で正しくCAVE_OBJECTを
  落とせていなかったバグを修正.
* プレイヤーがOBJECT地形にいる時に*破壊*を使っても足元の地形は*破壊*
  されないのにCAVE_OBJECTだけが飛んで, 無意味なmimicだけが残るバグを
  修正.
* 地震と*破壊*ではOBJECT地形であってもcave_set_feat()を通し, そこで
  CAVE_OBJECTを落とすので, 地震と*破壊*からCAVE_OBJECT処理削除.

src/cave.c
src/spells2.c

index 0894c0e..412b788 100644 (file)
@@ -4520,17 +4520,6 @@ void cave_set_feat(int y, int x, int feat)
        cave_type *c_ptr = &cave[y][x];
        feature_type *f_ptr = &f_info[feat];
 
-       if (character_dungeon && is_mirror_grid(c_ptr) && (d_info[dungeon_type].flags1 & DF1_DARKNESS))
-       {
-               c_ptr->info &= ~(CAVE_GLOW);
-               if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
-
-               /* Remove flag for mirror/glyph */
-               c_ptr->info &= ~(CAVE_OBJECT);
-
-               update_local_illumination(y, x);
-       }
-
        /* Clear mimic type */
        c_ptr->mimic = 0;
 
@@ -4539,6 +4528,17 @@ void cave_set_feat(int y, int x, int feat)
 
        if (character_dungeon)
        {
+               if (is_mirror_grid(c_ptr) && (d_info[dungeon_type].flags1 & DF1_DARKNESS))
+               {
+                       c_ptr->info &= ~(CAVE_GLOW);
+                       if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
+
+                       update_local_illumination(y, x);
+               }
+
+               /* Remove flag for mirror/glyph */
+               c_ptr->info &= ~(CAVE_OBJECT);
+
                /* Check for change to boring grid */
                if (!have_flag(f_ptr->flags, FF_REMEMBER)) c_ptr->info &= ~(CAVE_MARK);
 
index d78d0cb..677892e 100644 (file)
@@ -5262,8 +5262,8 @@ bool destroy_area(int y1, int x1, int r, bool in_generate)
 
                        if (!in_generate) /* Normal */
                        {
-                               /* Lose unsafety and runes/mirrors */
-                               c_ptr->info &= ~(CAVE_UNSAFE | CAVE_OBJECT);
+                               /* Lose unsafety */
+                               c_ptr->info &= ~(CAVE_UNSAFE);
 
                                /* Hack -- Notice player affect */
                                if (player_bold(y, x))
@@ -5871,9 +5871,6 @@ msg_format("%^s
                                /* Delete objects */
                                delete_object(yy, xx);
 
-                               /* Clear mirror, runes flag */
-                               c_ptr->info &= ~CAVE_OBJECT;
-
                                /* Wall (or floor) type */
                                t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;