add StateMachine

This commit is contained in:
2025-08-09 11:23:17 +02:00
parent ac3e949323
commit cba790f804
23 changed files with 174 additions and 244 deletions

View File

@@ -16,8 +16,7 @@ class ClientSimulation : public protocol::PacketHandler {
std::uint64_t m_StepTime;
game::World& m_World;
GameBuffer m_History;
std::uint64_t m_CurrentTime;
std::uint64_t m_LastTime;
float m_CurrentTime;
StepTime m_CurrentStep;
std::shared_ptr<WorldSnapshot> m_LastSnapshot;
@@ -45,7 +44,7 @@ class ClientSimulation : public protocol::PacketHandler {
/**
* \return the progress [0-1] between two steps
*/
float Update();
float Update(float a_Delta);
virtual void Handle(const protocol::packets::LockStepsPacket& a_LockSteps) override;
virtual void Handle(const protocol::packets::LockStepResponsePacket& a_LockSteps) override;