Reliably send the ReplayFinished message at the very end of visual replays. Patch by elexis.
This was SVN commit r16902.
This commit is contained in:
parent
a4e606c575
commit
1a8096a920
@ -549,6 +549,9 @@ void CNetReplayTurnManager::DoTurn(u32 turn)
|
||||
m_Simulation2.GetScriptInterface().ParseJSON(pair.second, &command);
|
||||
AddCommand(m_ClientId, pair.first, command, m_CurrentTurn + 1);
|
||||
}
|
||||
|
||||
if (turn == m_FinalReplayTurn)
|
||||
g_GUI->SendEventToAll("ReplayFinished");
|
||||
}
|
||||
|
||||
CNetServerTurnManager::CNetServerTurnManager(CNetServerWorker& server) :
|
||||
|
@ -389,12 +389,10 @@ bool CGame::Update(const double deltaRealTime, bool doInterpolate)
|
||||
PROFILE3("gui sim update");
|
||||
g_GUI->SendEventToAll("SimulationUpdate");
|
||||
}
|
||||
if (m_IsReplay && m_TurnManager->GetCurrentTurn() == m_FinalReplayTurn - 1)
|
||||
g_GUI->SendEventToAll("ReplayFinished");
|
||||
|
||||
GetView()->GetLOSTexture().MakeDirty();
|
||||
}
|
||||
|
||||
|
||||
if (CRenderer::IsInitialised())
|
||||
g_Renderer.GetTimeManager().Update(deltaSimTime);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user