OSDN Git Service

閉じることのできる地形の上にアイテムがあって, 閉じた後の地形にDROPが
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 22 Dec 2003 14:55:56 +0000 (14:55 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 22 Dec 2003 14:55:56 +0000 (14:55 +0000)
ありアイテムが置ける場合は閉じることができるように変更.

src/cmd2.c

index 2460978..2336b37 100644 (file)
@@ -1321,8 +1321,11 @@ static bool do_cmd_close_aux(int y, int x)
        /* Open door */
        if (have_flag(f_info[old_feat].flags, FF_CLOSE))
        {
+               s16b closed_feat = feat_state(old_feat, FF_CLOSE);
+
                /* Hack -- object in the way */
-               if ((c_ptr->o_idx || (c_ptr->info & CAVE_OBJECT)) && (feat_state(old_feat, FF_CLOSE) != old_feat))
+               if ((c_ptr->o_idx || (c_ptr->info & CAVE_OBJECT)) &&
+                   (closed_feat != old_feat) && !have_flag(f_info[closed_feat].flags, FF_DROP))
                {
                        /* Message */
 #ifdef JP