send map when arriving late

This commit is contained in:
2025-08-22 12:24:58 +02:00
parent 688b6e93ea
commit 5b6254c690
12 changed files with 52 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ class ClientSimulation : public protocol::PacketHandler {
* \brief Live update constructor (continuous game updates)
* \param a_StepTime in ms
*/
ClientSimulation(std::shared_ptr<game::World> a_World, std::uint64_t a_StepTime);
ClientSimulation(std::shared_ptr<game::World> a_World, std::uint64_t a_StepTime, const std::vector<protocol::LockStep>& a_FirstSteps);
/**
* \return the progress [0-1] between two steps

View File

@@ -16,7 +16,7 @@ class ServerSimulation : public protocol::CommandHandler {
game::World& m_World;
std::uint64_t m_StepTime;
std::uint64_t m_CurrentTime;
std::vector<td::protocol::LockStep> m_History;
std::vector<protocol::LockStep> m_History;
using protocol::CommandHandler::Handle;
@@ -27,6 +27,8 @@ class ServerSimulation : public protocol::CommandHandler {
protocol::packets::LockStepsPacket MakePacket();
std::vector<protocol::LockStep> GetFirstLocksteps();
// no checks are done !
virtual void Handle(const protocol::commands::SpawnTroopCommand& a_SpawnTroop) override;