projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with CE replacing exploding player, causing half-dead player
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index ef117c8fa9409fc9bc4e63b6878a1e5e022c185b..338355393f4e08063bc4de7ab28fe820fde403f8 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-10642,6
+10642,15
@@
static void CreateFieldExt(int x, int y, int element, boolean is_change)
if (GFX_CRUMBLED(new_element))
TEST_DrawLevelFieldCrumbledNeighbours(x, y);
if (GFX_CRUMBLED(new_element))
TEST_DrawLevelFieldCrumbledNeighbours(x, y);
+ if (old_element == EL_EXPLOSION)
+ {
+ Store[x][y] = Store2[x][y] = 0;
+
+ // check if new element replaces an exploding player, requiring cleanup
+ if (IS_PLAYER(x, y) && !PLAYERINFO(x, y)->present)
+ StorePlayer[x][y] = 0;
+ }
+
// check if element under the player changes from accessible to unaccessible
// (needed for special case of dropping element which then changes)
// (must be checked after creating new element for walkable group elements)
// check if element under the player changes from accessible to unaccessible
// (needed for special case of dropping element which then changes)
// (must be checked after creating new element for walkable group elements)