From 6aab94663ade1e74db318e47629441b065bbea17 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 3 Oct 2018 12:01:15 +0200 Subject: [PATCH] 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. --- src/game.c | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.34.1