fixed bug with causing explosion instead of killing player directly
authorHolger Schemel <info@artsoft.org>
Sun, 8 Oct 2023 12:01:10 +0000 (14:01 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 8 Oct 2023 12:04:34 +0000 (14:04 +0200)
While the final effect is the same (player is killed), the player was
killed by an explosion before (causing a "double explosion" when the
player itself exploded when being killed by the explosion), while the
player is killed directly now, preventing the double explosion.

src/game.c

index ea30528996c15d9b1a706d899d0d6f0853dd5bd7..ef117c8fa9409fc9bc4e63b6878a1e5e022c185b 100644 (file)
@@ -10648,7 +10648,7 @@ static void CreateFieldExt(int x, int y, int element, boolean is_change)
     if (IS_PLAYER(x, y) && !player_explosion_protected &&
        IS_ACCESSIBLE(old_element) && !IS_ACCESSIBLE(new_element))
     {
-      Bang(x, y);
+      KillPlayer(PLAYERINFO(x, y));
 
       return;
     }