OSDN Git Service

デバッグコマンドでの指定モンスター召喚で, 森の中に召喚ができなかった
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 12 Oct 2003 01:31:06 +0000 (01:31 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 12 Oct 2003 01:31:06 +0000 (01:31 +0000)
バグを修正.

src/wizard2.c

index a4a59da..6ab0e7f 100644 (file)
@@ -1599,28 +1599,7 @@ static void do_cmd_wiz_summon(int num)
  */
 static void do_cmd_wiz_named(int r_idx)
 {
-       int i, x, y;
-
-       /* Paranoia */
-       /* if (!r_idx) return; */
-
-       /* Prevent illegal monsters */
-       if (r_idx >= max_r_idx) return;
-
-       /* Try 10 times */
-       for (i = 0; i < 10; i++)
-       {
-               int d = 1;
-
-               /* Pick a location */
-               scatter(&y, &x, py, px, d, 0);
-
-               /* Require empty grids */
-               if (!cave_empty_bold(y, x)) continue;
-
-               /* Place it (allow groups) */
-               if (place_monster_aux(0, y, x, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP))) break;
-       }
+       (void)summon_named_creature(0, py, px, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
 }
 
 
@@ -1631,7 +1610,7 @@ static void do_cmd_wiz_named(int r_idx)
  */
 static void do_cmd_wiz_named_friendly(int r_idx)
 {
-       (void) summon_named_creature(0, py, px, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
+       (void)summon_named_creature(0, py, px, r_idx, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP | PM_FORCE_PET));
 }