forked from mirrors/0ad
Stop the animations at the end of visual replays, refs #3581.
This was SVN commit r17709.
This commit is contained in:
@@ -285,6 +285,10 @@ void CNetTurnManager::Interpolate(float simFrameLength, float realFrameLength)
|
|||||||
// we need to save the previous turn length?
|
// we need to save the previous turn length?
|
||||||
|
|
||||||
float offset = clamp(m_DeltaSimTime / (m_TurnLength / 1000.f) + 1.0, 0.0, 1.0);
|
float offset = clamp(m_DeltaSimTime / (m_TurnLength / 1000.f) + 1.0, 0.0, 1.0);
|
||||||
|
|
||||||
|
if (m_FinalTurn > 0 && m_CurrentTurn > m_FinalTurn)
|
||||||
|
simFrameLength = 0;
|
||||||
|
|
||||||
m_Simulation2.Interpolate(simFrameLength, offset, realFrameLength);
|
m_Simulation2.Interpolate(simFrameLength, offset, realFrameLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user