From: Holger Schemel Date: Wed, 3 Oct 2018 10:01:15 +0000 (+0200) Subject: fixed buggy behaviour when only one player needed to solve a level X-Git-Tag: 4.1.1.0~10 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=6aab94663ade1e74db318e47629441b065bbea17;ds=sidebyside fixed buggy behaviour when only one player needed to solve a level Before, when setting "[x] only one player must enter exit", a level with two players was solved when one player was killed, and then the other player entered an exit. But it was not yet solved if one player entered an exit and the other player was still on the playfield. Now, the first player really solves the level when entering an exit, regardless of any other players still around on the playfield. --- diff --git a/src/game.c b/src/game.c index 70b9b811..03dca6bb 100644 --- a/src/game.c +++ b/src/game.c @@ -13433,6 +13433,10 @@ void ExitPlayer(struct PlayerInfo *player) if (local_player->players_still_needed > 0) local_player->players_still_needed--; + + /* also set if some players not yet gone, but not needed to solve level */ + if (local_player->players_still_needed == 0) + AllPlayersGone = TRUE; } static void setFieldForSnapping(int x, int y, int element, int direction)