| 184 | } |
| 185 | |
| 186 | void CGhost::CheckStart() |
| 187 | { |
| 188 | int RaceTick = -GameClient()->m_Snap.m_pGameInfoObj->m_WarmupTimer; |
| 189 | int RenderTick = m_NewRenderTick; |
| 190 | |
| 191 | if(GameClient()->LastRaceTick() != RaceTick && Client()->GameTick(g_Config.m_ClDummy) - RaceTick < Client()->GameTickSpeed()) |
| 192 | { |
| 193 | if(m_Rendering && m_RenderingStartedByServer) // race restarted: stop rendering |
| 194 | StopRender(); |
| 195 | if(m_Recording && GameClient()->LastRaceTick() != -1) // race restarted: activate restarting for local start detection so we have a smooth transition |
| 196 | m_AllowRestart = true; |
| 197 | if(GameClient()->LastRaceTick() == -1) // no restart: reset rendering preparations |
| 198 | m_NewRenderTick = -1; |
| 199 | if(GhostRecorder()->IsRecording()) // race restarted: stop recording |
| 200 | GhostRecorder()->Stop(0, -1); |
| 201 | int StartTick = RaceTick; |
| 202 | |
| 203 | if(GameClient()->m_GameInfo.m_BugDDRaceGhost) // the client recognizes the start one tick earlier than ddrace servers |
| 204 | StartTick--; |
| 205 | StartRecord(StartTick); |
| 206 | RenderTick = StartTick; |
| 207 | } |
| 208 | |
| 209 | TryRenderStart(RenderTick, true); |
| 210 | } |
| 211 | |
| 212 | void CGhost::CheckStartLocal(bool Predicted) |
| 213 | { |
nothing calls this directly
no test coverage detected