MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / updateTurbo

Method updateTurbo

game/state/gamestate.cpp:1479–1494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1477}
1478
1479void GameState::updateTurbo()
1480{
1481 if (!this->canTurbo())
1482 {
1483 LogError("Called when canTurbo() is false");
1484 }
1485 unsigned ticksToUpdate = TURBO_TICKS;
1486 // Turbo always re-aligns to TURBO_TICKS (5 minutes)
1487 unsigned int align = this->gameTime.getTicks() % TURBO_TICKS;
1488 if (align != 0)
1489 {
1490 ticksToUpdate -= align;
1491 }
1492 this->update(ticksToUpdate);
1493 this->updateAfterTurbo();
1494}
1495
1496void GameState::updateAfterTurbo()
1497{

Callers 1

updateMethod · 0.80

Calls 4

canTurboMethod · 0.95
updateMethod · 0.95
updateAfterTurboMethod · 0.95
getTicksMethod · 0.80

Tested by

no test coverage detected