racing:: just reset the race on restart

This commit is contained in:
Zeno Rogue 2022-06-16 23:11:34 +02:00
parent b888205a17
commit 83eb725448
1 changed files with 5 additions and 0 deletions

View File

@ -1620,6 +1620,11 @@ EX void start_game() {
// popAllScreens + popAllGames + stop_game + switch_game_mode + start_game
EX void restart_game(char switchWhat IS(rg::nothing)) {
popScreenAll();
if(switchWhat == rg::nothing && racing::on) {
racing::restore_goals();
racing::reset_race();
return;
}
stop_game();
switch_game_mode(switchWhat);
start_game();