OSDN Git Service

剣術/忍術 "入身" でモンスターを倒してプレイヤーが実際に移動するまでの
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 27 Jan 2004 11:58:17 +0000 (11:58 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Tue, 27 Jan 2004 11:58:17 +0000 (11:58 +0000)
間に血の呪いやカオスの守護悪魔の報酬などでテレポートすると, テレポー
ト直後に元の位置に戻ってくるバグを修正.

src/spells2.c

index ace5f53..f91b8c2 100644 (file)
@@ -7417,6 +7417,7 @@ bool rush_attack(bool *mdeath)
        u16b path_g[32];
        int path_n, i;
        bool tmp_mdeath = FALSE;
+       bool moved = FALSE;
 
        if (mdeath) *mdeath = FALSE;
 
@@ -7518,12 +7519,14 @@ bool rush_attack(bool *mdeath)
 #endif
                }
 
+               if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
+               moved = TRUE;
                tmp_mdeath = py_attack(ny, nx, HISSATSU_NYUSIN);
 
                break;
        }
 
-       if (!player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
+       if (!moved && !player_bold(ty, tx)) teleport_player_to(ty, tx, FALSE, FALSE);
 
        if (mdeath) *mdeath = tmp_mdeath;
        return TRUE;