if (GFX_CRUMBLED(new_element))
TEST_DrawLevelFieldCrumbledNeighbours(x, y);
- }
- // 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)
- if (IS_PLAYER(x, y) && !player_explosion_protected &&
- IS_ACCESSIBLE(old_element) && !IS_ACCESSIBLE(new_element))
- {
- Bang(x, y);
+ if (old_element == EL_EXPLOSION)
+ {
+ Store[x][y] = Store2[x][y] = 0;
- return;
+ // 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)
+ if (IS_PLAYER(x, y) && !player_explosion_protected &&
+ IS_ACCESSIBLE(old_element) && !IS_ACCESSIBLE(new_element))
+ {
+ KillPlayer(PLAYERINFO(x, y));
+
+ return;
+ }
}
// "ChangeCount" not set yet to allow "entered by player" change one time