#include namespace td { namespace client { GameState::GameState(Client& a_Client, const std::shared_ptr& a_World, std::uint64_t a_StepTime) : ClientState(a_Client), m_World(a_World), m_Simulation(a_World, a_StepTime) { m_Simulation.OnMissingLockSteps.Connect([this](const std::vector& a_MissingSteps) { SendPacket(protocol::packets::LockStepRequestPacket(a_MissingSteps)); }); } void GameState::Handle(const protocol::packets::LockStepsPacket& a_LockStep) { m_Simulation.Handle(a_LockStep); } void GameState::Handle(const protocol::packets::LockStepResponsePacket& a_LockStep) { m_Simulation.Handle(a_LockStep); } void GameState::Update(float a_Delta) { m_CurrentLerp = m_Simulation.Update(a_Delta); } } // namespace client } // namespace td