mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Merge pull request #13869 from ZehMatt/feature/timescale
Allow the main game loop to scale the delta time
This commit is contained in:
@@ -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]))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user