player->gems_still_needed = level.gems_needed;
player->sokobanfields_still_needed = 0;
player->lights_still_needed = 0;
+ player->players_still_needed = 0;
player->friends_still_needed = 0;
for (j = 0; j < MAX_NUM_KEYS; j++)
}
}
+ for (i = 0; i < MAX_PLAYERS; i++)
+ if (stored_player[i].active)
+ local_player->players_still_needed++;
+
/* when recording the game, store which players take part in the game */
if (tape.recording)
{
{
DrawPlayer(player); /* needed here only to cleanup last field */
RemovePlayer(player);
+
+ local_player->players_still_needed--;
}
static void setFieldForSnapping(int x, int y, int element, int direction)
if (local_player->sokobanfields_still_needed == 0 &&
(game.emulation == EMU_SOKOBAN || level.auto_exit_sokoban))
{
+ local_player->players_still_needed = 0;
+
PlayerWins(player);
PlayLevelSound(x, y, SND_GAME_SOKOBAN_SOLVING);
int gems_still_needed;
int sokobanfields_still_needed;
int lights_still_needed;
+ int players_still_needed;
int friends_still_needed;
int key[MAX_NUM_KEYS];
int num_white_keys;