X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame.c;h=7076d52c6c70bfbb809c435d9ecd83d94929f8a7;hp=2cf0e9aa46a468e4eacf98bf528d34964359d322;hb=6e7af3cc6bf12e02a3b0ea576a3ffb9e7c32b0ba;hpb=5ef9148d1f605af02e872264519eda261a3e88ca diff --git a/src/game.c b/src/game.c index 2cf0e9aa..7076d52c 100644 --- a/src/game.c +++ b/src/game.c @@ -1112,6 +1112,7 @@ void TestIfGoodThingGetsHitByBadThing(int, int, int); void KillPlayer(struct PlayerInfo *); void BuryPlayer(struct PlayerInfo *); void RemovePlayer(struct PlayerInfo *); +void RemovePlayerWithCleanup(struct PlayerInfo *); static int getInvisibleActiveFromInvisibleElement(int); static int getInvisibleFromInvisibleActiveElement(int); @@ -12641,8 +12642,7 @@ void ScrollPlayer(struct PlayerInfo *player, int mode) Feld[jx][jy] == EL_SP_EXIT_OPEN || Feld[jx][jy] == EL_SP_EXIT_OPENING) /* <-- special case */ { - DrawPlayer(player); /* needed here only to cleanup last field */ - RemovePlayer(player); + RemovePlayerWithCleanup(player); if (local_player->friends_still_needed == 0 || IS_SP_ELEMENT(Feld[jx][jy])) @@ -13402,6 +13402,12 @@ void RemovePlayer(struct PlayerInfo *player) ExitY = ZY = jy; } +void RemovePlayerWithCleanup(struct PlayerInfo *player) +{ + DrawPlayer(player); /* needed here only to cleanup last field */ + RemovePlayer(player); +} + static void setFieldForSnapping(int x, int y, int element, int direction) { struct ElementInfo *ei = &element_info[element];