X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2FInteractiveState.hpp;h=91a5944181b2979b075ddce9b80af3d2657a5a48;hb=8507332e2d0c54aec4045fb6f0021bdc3bd57750;hp=9b1ce52236309d23751286b037e2d80ead35701f;hpb=d2eb51ad9759eeee743b04aee6f1ae69132fc706;p=blank.git diff --git a/src/client/InteractiveState.hpp b/src/client/InteractiveState.hpp index 9b1ce52..91a5944 100644 --- a/src/client/InteractiveState.hpp +++ b/src/client/InteractiveState.hpp @@ -8,8 +8,11 @@ #include "../ui/Interface.hpp" #include "../world/BlockTypeRegistry.hpp" #include "../world/ChunkRenderer.hpp" +#include "../world/EntityState.hpp" #include "../world/World.hpp" +#include + namespace blank { @@ -35,6 +38,9 @@ public: void Update(int dt) override; void Render(Viewport &) override; + void PushPlayerUpdate(const Entity &); + void MergePlayerCorrection(std::uint16_t, const EntityState &); + private: MasterState &master; BlockTypeRegistry block_types; @@ -45,6 +51,15 @@ private: Skeletons skeletons; IntervalTimer update_timer; + struct PlayerHistory { + EntityState state; + int timestamp; + std::uint16_t packet; + PlayerHistory(EntityState s, int t, std::uint16_t p) + : state(s), timestamp(t), packet(p) { } + }; + std::list player_hist; + }; }