if (tape.single_step && tape.recording && !tape.pausing)
{
+#if 1
+ /* as it is called "single step mode", just return to pause mode when the
+ player stopped moving after one tile (or never starts moving at all) */
+ if (!player->is_moving)
+#else
+ /* this is buggy: there are quite some cases where the single step mode
+ does not return to pause mode (like pushing things that don't move
+ or simply by trying to run against a wall) */
if (button1 || (dropped && !moved))
+#endif
{
TapeTogglePause(TAPE_TOGGLE_AUTOMATIC);
SnapField(player, 0, 0); /* stop snapping */
{
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 */
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 (TimeFrames >= FRAMES_PER_SECOND)
{
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();
PlayLevelSoundElementAction(nextx, nexty, EL_SOKOBAN_FIELD_EMPTY,
ACTION_FILLING);
+#if 1
+ if (local_player->sokobanfields_still_needed == 0 &&
+ (game.emulation == EMU_SOKOBAN || level.auto_exit_sokoban))
+#else
if (local_player->sokobanfields_still_needed == 0 &&
game.emulation == EMU_SOKOBAN)
+#endif
{
PlayerWins(player);