player->killed = FALSE;
player->reanimated = FALSE;
+ player->buried = FALSE;
player->action = 0;
player->effective_action = 0;
DigField(player, 0, 0, 0, 0, 0, 0, DF_NO_PUSH);
SnapField(player, 0, 0);
- player->GameOver = FALSE;
-
map_player_action[i] = i;
}
AllPlayersGone = FALSE;
game.LevelSolved = FALSE;
+ game.GameOver = FALSE;
game.LevelSolved_GameWon = FALSE;
game.LevelSolved_GameEnd = FALSE;
return;
game.LevelSolved = TRUE;
-
- local_player->GameOver = TRUE;
+ game.GameOver = TRUE;
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;
- 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
game.friends_still_needed--;
if (!game.friends_still_needed &&
- !local_player->GameOver && AllPlayersGone)
+ !game.GameOver && AllPlayersGone)
LevelSolved();
return;
PlayLevelSoundElementAction(jx, jy, player->artwork_element, ACTION_DYING);
PlayLevelSound(jx, jy, SND_GAME_LOSING);
- player->GameOver = TRUE;
RemovePlayer(player);
+
+ player->buried = TRUE;
+ game.GameOver = TRUE;
}
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
- return (local_player->GameOver && !game.LevelSolved);
+ return (game.GameOver && !game.LevelSolved);
}
boolean checkGameEnded(void)
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)
// 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;
+ boolean GameOver;
boolean LevelSolved_GameWon;
boolean LevelSolved_GameEnd;
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)
boolean gravity;
- boolean GameOver;
-
int last_move_dir;
boolean is_active;