| 1477 | } |
| 1478 | |
| 1479 | void 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 | |
| 1496 | void GameState::updateAfterTurbo() |
| 1497 | { |
no test coverage detected