X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=1b3de85223f0565546111589206ae7b4a1e387b8;hb=70b6d1af1a18c70b698cac732ec04e69ac32315c;hp=9ee9ca4972a9719731f0885f390c4928f867a2cd;hpb=a606b4bf796ba79cea7633dabb28484b6233b5c1;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 9ee9ca49..1b3de852 100644 --- a/src/screens.c +++ b/src/screens.c @@ -3088,16 +3088,36 @@ void HandleGameActions() byte tape_action[MAX_PLAYERS]; int i; +#if 1 if (level.native_em_level->lev->home == 0) /* all players at home */ { + local_player->LevelSolved = TRUE; + AllPlayersGone = TRUE; + + level.native_em_level->lev->home = -1; + } + + if (local_player->LevelSolved) GameWon(); - if (!TAPE_IS_STOPPED(tape)) + if (AllPlayersGone && !TAPE_IS_STOPPED(tape)) + TapeStop(); + + if (game_status != GAME_MODE_PLAYING) + return; +#else + if (level.native_em_level->lev->home == 0) /* all players at home */ + { + if (local_player->LevelSolved) + GameWon(); + + if (AllPlayersGone && !TAPE_IS_STOPPED(tape)) TapeStop(); if (game_status != GAME_MODE_PLAYING) return; } +#endif if (level.native_em_level->ply[0]->alive == 0 && level.native_em_level->ply[1]->alive == 0 &&