fill client holes (lockstep)

This commit is contained in:
2025-08-07 10:53:00 +02:00
parent c813c49707
commit ba84864b6a
9 changed files with 95 additions and 22 deletions

View File

@@ -36,5 +36,17 @@ void ServerSimulation::Handle(const protocol::commands::PlaceTowerCommand& a_Pla
AddToCommandHistory(m_History[m_CurrentTime + LOCKSTEP_BUFFER_SIZE], a_PlaceTower);
}
protocol::packets::LockStepResponsePacket ServerSimulation::GetResponse(
const protocol::packets::LockStepRequestPacket& a_Missing) const {
std::map<StepTime, protocol::LockStep> result;
for (StepTime step : a_Missing->m_Missing) {
result.emplace(step, m_History[step]);
}
return {result};
}
} // namespace sim
} // namespace td