| 556 | } |
| 557 | |
| 558 | void IGameController::Tick() |
| 559 | { |
| 560 | // do warmup |
| 561 | if(m_Warmup) |
| 562 | { |
| 563 | m_Warmup--; |
| 564 | if(!m_Warmup) |
| 565 | StartRound(); |
| 566 | } |
| 567 | |
| 568 | if(m_GameOverTick != -1) |
| 569 | { |
| 570 | // game over.. wait for restart |
| 571 | if(Server()->Tick() > m_GameOverTick + Server()->TickSpeed() * 10) |
| 572 | { |
| 573 | StartRound(); |
| 574 | m_RoundCount++; |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | if(m_pLoadBestTimeResult != nullptr && m_pLoadBestTimeResult->m_Completed) |
| 579 | { |
| 580 | if(m_pLoadBestTimeResult->m_Success) |
| 581 | { |
| 582 | m_CurrentRecord = m_pLoadBestTimeResult->m_CurrentRecord; |
| 583 | |
| 584 | for(int i = 0; i < MAX_CLIENTS; i++) |
| 585 | { |
| 586 | if(GameServer()->m_apPlayers[i] && GameServer()->m_apPlayers[i]->GetClientVersion() >= VERSION_DDRACE) |
| 587 | { |
| 588 | GameServer()->SendRecord(i); |
| 589 | } |
| 590 | } |
| 591 | } |
| 592 | m_pLoadBestTimeResult = nullptr; |
| 593 | } |
| 594 | |
| 595 | DoActivityCheck(); |
| 596 | } |
| 597 | |
| 598 | void IGameController::Snap(int SnappingClient) |
| 599 | { |
no test coverage detected