if (game_status != GAME_MODE_PLAYING)
return;
- if (local_player->LevelSolved)
- GameWon();
+ /* !!! FIX THIS (START) !!! */
+ if (level.file_info.type == LEVEL_FILE_TYPE_EM)
+ {
+ byte summarized_player_action = 0;
+ int i;
- if (AllPlayersGone && !TAPE_IS_STOPPED(tape))
- TapeStop();
+ for (i = 0; i < MAX_PLAYERS; i++)
+ summarized_player_action |= stored_player[i].action;
- GameActions();
- BackToFront();
+ if (em_main_handle_game(summarized_player_action) != 0)
+ {
+ game_status = GAME_MODE_MAIN;
+ DrawMainMenu();
+ }
+ }
+ else
+ {
+ if (local_player->LevelSolved)
+ GameWon();
+
+ if (AllPlayersGone && !TAPE_IS_STOPPED(tape))
+ TapeStop();
- if (tape.auto_play && !tape.playing)
- AutoPlayTape(); /* continue automatically playing next tape */
+ GameActions();
+ BackToFront();
+
+ if (tape.auto_play && !tape.playing)
+ AutoPlayTape(); /* continue automatically playing next tape */
+ }
}
/* ---------- new screen button stuff -------------------------------------- */