MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / update

Function update

src/OpenLoco/src/World/TownManager.cpp:445–461  ·  view source on GitHub ↗

0x00496B6D

Source from the content-addressed store, hash-verified

443
444 // 0x00496B6D
445 void update()
446 {
447 if (Game::hasFlags(GameStateFlags::tileManagerLoaded) && !SceneManager::isEditorMode())
448 {
449 auto ticks = ScenarioManager::getScenarioTicks();
450 if (ticks % 8 == 0)
451 {
452 const auto id = TownId((ticks / 8) % 0x7F);
453 auto town = get(id);
454 if (town != nullptr && !town->empty())
455 {
456 GameCommands::setUpdatingCompanyId(CompanyId::neutral);
457 town->update();
458 }
459 }
460 }
461 }
462
463 // 0x0049771C
464 void updateLabels()

Callers

nothing calls this directly

Calls 8

isEditorModeFunction · 0.85
getScenarioTicksFunction · 0.85
TownIdEnum · 0.85
setUpdatingCompanyIdFunction · 0.85
hasFlagsFunction · 0.70
getFunction · 0.70
emptyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected