1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Allow the main game loop to scale the delta time

This commit is contained in:
Matt
2021-01-19 19:44:36 +02:00
parent bd27046142
commit f684ebd7d9
3 changed files with 37 additions and 7 deletions

View File

@@ -693,6 +693,10 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv)
{
console.WriteFormatLine("current_rotation %d", get_current_rotation());
}
else if (argv[0] == "host_timescale")
{
console.WriteFormatLine("host_timescale %.02f", OpenRCT2::GetContext()->GetTimeScale());
}
#ifndef NO_TTF
else if (argv[0] == "enable_hinting")
{
@@ -1011,6 +1015,14 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
}
console.Execute("get current_rotation");
}
else if (argv[0] == "host_timescale" && invalidArguments(&invalidArgs, double_valid[0]))
{
float newScale = static_cast<float>(double_val[0]);
OpenRCT2::GetContext()->SetTimeScale(newScale);
console.Execute("get host_timescale");
}
#ifndef NO_TTF
else if (argv[0] == "enable_hinting" && invalidArguments(&invalidArgs, int_valid[0]))
{