{
int i;
+ /* !!! SAME CODE AS IN "GameActions()" -- FIX THIS !!! */
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
if (level.native_em_level->lev->home == 0) /* all players at home */
}
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
{
- if (game_sp_info.LevelSolved) /* game won */
+ if (game_sp_info.LevelSolved &&
+ !game_sp_info.GameOver) /* game won */
{
PlayerWins(local_player);
+ game_sp_info.GameOver = TRUE;
+
AllPlayersGone = TRUE;
}
if (game.restart_level)
StartGameActions(options.network, setup.autorecord, level.random_seed);
+ /* !!! SAME CODE AS IN "CheckLevelTime()" -- FIX THIS !!! */
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
if (level.native_em_level->lev->home == 0) /* all players at home */
level.native_em_level->ply[3]->alive == 0) /* all dead */
AllPlayersGone = TRUE;
}
+ else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
+ {
+ if (game_sp_info.LevelSolved &&
+ !game_sp_info.GameOver) /* game won */
+ {
+ PlayerWins(local_player);
+
+ game_sp_info.GameOver = TRUE;
+
+ AllPlayersGone = TRUE;
+ }
+
+ if (game_sp_info.GameOver) /* game lost */
+ AllPlayersGone = TRUE;
+ }
if (local_player->LevelSolved && !local_player->LevelSolved_GameEnd)
GameWon();