This also removes asymmetric behaviour depending on players being the
"local player" or any other player in team mode (which happened if one
player dies and the other enters the exit, for example -- in one case,
the game will be treated as "game over", in the other case the game
will continue running without asking to play again).
player->killed = FALSE;
player->reanimated = FALSE;
player->killed = FALSE;
player->reanimated = FALSE;
+ player->buried = FALSE;
player->action = 0;
player->effective_action = 0;
player->action = 0;
player->effective_action = 0;
DigField(player, 0, 0, 0, 0, 0, 0, DF_NO_PUSH);
SnapField(player, 0, 0);
DigField(player, 0, 0, 0, 0, 0, 0, DF_NO_PUSH);
SnapField(player, 0, 0);
- player->GameOver = FALSE;
-
map_player_action[i] = i;
}
map_player_action[i] = i;
}
AllPlayersGone = FALSE;
game.LevelSolved = FALSE;
AllPlayersGone = FALSE;
game.LevelSolved = FALSE;
game.LevelSolved_GameWon = FALSE;
game.LevelSolved_GameEnd = FALSE;
game.LevelSolved_GameWon = FALSE;
game.LevelSolved_GameEnd = FALSE;
return;
game.LevelSolved = TRUE;
return;
game.LevelSolved = TRUE;
-
- local_player->GameOver = TRUE;
local_player->score_final = (level.game_engine_type == GAME_ENGINE_TYPE_EM ?
level.native_em_level->lev->score :
local_player->score_final = (level.game_engine_type == GAME_ENGINE_TYPE_EM ?
level.native_em_level->lev->score :
int enter_side = enter_side_horiz | enter_side_vert;
int leave_side = leave_side_horiz | leave_side_vert;
int enter_side = enter_side_horiz | enter_side_vert;
int leave_side = leave_side_horiz | leave_side_vert;
- if (player->GameOver) // do not reanimate dead player
+ if (player->buried) // do not reanimate dead player
return;
if (!player_relocated) // no need to relocate the player
return;
if (!player_relocated) // no need to relocate the player
game.friends_still_needed--;
if (!game.friends_still_needed &&
game.friends_still_needed--;
if (!game.friends_still_needed &&
- !local_player->GameOver && AllPlayersGone)
+ !game.GameOver && AllPlayersGone)
PlayLevelSoundElementAction(jx, jy, player->artwork_element, ACTION_DYING);
PlayLevelSound(jx, jy, SND_GAME_LOSING);
PlayLevelSoundElementAction(jx, jy, player->artwork_element, ACTION_DYING);
PlayLevelSound(jx, jy, SND_GAME_LOSING);
- player->GameOver = TRUE;
+
+ player->buried = TRUE;
+ game.GameOver = TRUE;
}
void RemovePlayer(struct PlayerInfo *player)
}
void RemovePlayer(struct PlayerInfo *player)
else if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
return (game_mm.game_over && !game_mm.level_solved);
else // GAME_ENGINE_TYPE_RND
else if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
return (game_mm.game_over && !game_mm.level_solved);
else // GAME_ENGINE_TYPE_RND
- return (local_player->GameOver && !game.LevelSolved);
+ return (game.GameOver && !game.LevelSolved);
}
boolean checkGameEnded(void)
}
boolean checkGameEnded(void)
int belt_dir_nr[4];
int switchgate_pos;
int wind_direction;
int belt_dir_nr[4];
int switchgate_pos;
int wind_direction;
boolean explosions_delayed;
boolean envelope_active;
boolean no_time_limit; // (variable only in very special case)
boolean explosions_delayed;
boolean envelope_active;
boolean no_time_limit; // (variable only in very special case)
// values for game engine snapshot control
struct GameSnapshotInfo snapshot;
// values for game engine snapshot control
struct GameSnapshotInfo snapshot;
- // values for handling states for solved level
+ // values for handling states for solved level and game over
boolean LevelSolved_GameWon;
boolean LevelSolved_GameEnd;
boolean LevelSolved_GameWon;
boolean LevelSolved_GameEnd;
boolean killed; // player maybe present/active, but killed
boolean reanimated; // player maybe killed, but reanimated
boolean killed; // player maybe present/active, but killed
boolean reanimated; // player maybe killed, but reanimated
+ boolean buried; // player finally killed and removed
int index_nr; // player number (0 to 3)
int index_bit; // player number bit (1 << 0 to 1 << 3)
int index_nr; // player number (0 to 3)
int index_bit; // player number bit (1 << 0 to 1 << 3)
int last_move_dir;
boolean is_active;
int last_move_dir;
boolean is_active;