MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ScenarioUpdate

Function ScenarioUpdate

src/openrct2/scenario/Scenario.cpp:391–416  ·  view source on GitHub ↗

* Scenario and finance related update iteration. * rct2: 0x006C44B1 */

Source from the content-addressed store, hash-verified

389 * rct2: 0x006C44B1
390 */
391void ScenarioUpdate(GameState_t& gameState)
392{
393 PROFILED_FUNCTION();
394
395 if (gLegacyScene == LegacyScene::playing)
396 {
397 auto& date = GetDate();
398 if (date.IsDayStart())
399 {
400 ScenarioDayUpdate(gameState);
401 }
402 if (date.IsWeekStart())
403 {
404 ScenarioWeekUpdate();
405 }
406 if (date.IsFortnightStart())
407 {
408 ScenarioFortnightUpdate();
409 }
410 if (date.IsMonthStart())
411 {
412 ScenarioMonthUpdate();
413 }
414 }
415 ScenarioUpdateDayNightCycle();
416}
417/**
418 *
419 * rct2: 0x006744A9

Callers 1

gameStateUpdateLogicFunction · 0.85

Calls 9

ScenarioDayUpdateFunction · 0.85
ScenarioWeekUpdateFunction · 0.85
ScenarioFortnightUpdateFunction · 0.85
ScenarioMonthUpdateFunction · 0.85
IsDayStartMethod · 0.80
IsWeekStartMethod · 0.80
IsFortnightStartMethod · 0.80
IsMonthStartMethod · 0.80

Tested by

no test coverage detected