Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/system/TurnManager.cpp
Show First 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | while (m_ReadyTurn > m_CurrentTurn) | ||||
NETTURN_LOG("Running %d cmds\n", commands.size()); | NETTURN_LOG("Running %d cmds\n", commands.size()); | ||||
m_Simulation2.Update(m_TurnLength, commands); | m_Simulation2.Update(m_TurnLength, commands); | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
u32 CTurnManager::GetLatestTurnLength() const | |||||
{ | |||||
return m_TurnLength; | |||||
} | |||||
void CTurnManager::Interpolate(float simFrameLength, float realFrameLength) | void CTurnManager::Interpolate(float simFrameLength, float realFrameLength) | ||||
{ | { | ||||
// TODO: using m_TurnLength might be a bit dodgy when length changes - maybe | // TODO: using m_TurnLength might be a bit dodgy when length changes - maybe | ||||
// 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); | ||||
// Stop animations while still updating the selection highlight | // Stop animations while still updating the selection highlight | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator