This bug could happen when a player was just exploding (for whatever
reason) and an adjacent CE replaced the explosion's center element
with something else, leading to the player not being totally removed,
potentially causing some strange effects afterwards.
This change adds some cleanup required to prevent such cases.
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)