1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Automatically reset speed to normal upon scenario completion. (#10998)

This commit is contained in:
Aaron van Geffen
2020-03-22 23:22:28 +01:00
committed by GitHub
parent 2a94632b32
commit a2f8e8c72b
4 changed files with 9 additions and 0 deletions

View File

@@ -85,6 +85,12 @@ rct_string_id gGameCommandErrorText;
using namespace OpenRCT2;
void game_reset_speed()
{
gGameSpeed = 1;
window_invalidate_by_class(WC_TOP_TOOLBAR);
}
void game_increase_game_speed()
{
gGameSpeed = std::min(gConfigGeneral.debugging_tools ? 5 : 4, gGameSpeed + 1);

View File

@@ -145,6 +145,7 @@ extern std::string gCurrentLoadedPath;
extern bool gLoadKeepWindowsOpen;
void game_reset_speed();
void game_increase_game_speed();
void game_reduce_game_speed();

View File

@@ -177,6 +177,7 @@ void scenario_begin()
static void scenario_end()
{
game_reset_speed();
window_close_by_class(WC_DROPDOWN);
window_close_all_except_flags(WF_STICK_TO_BACK | WF_STICK_TO_FRONT);
context_open_window_view(WV_PARK_OBJECTIVE);