X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2FInteractiveState.hpp;h=8e7064eacf0a1e2be1f98bf309abe463f26d7043;hb=1c2994622a6b73f90cbd3ec9c09ffb4d7724cab4;hp=1b9c9a5ba06fc4b42a6a92399daee24ab6ce144a;hpb=b066e776622f96e906600a0c4a08de392bd03676;p=blank.git diff --git a/src/client/InteractiveState.hpp b/src/client/InteractiveState.hpp index 1b9c9a5..8e7064e 100644 --- a/src/client/InteractiveState.hpp +++ b/src/client/InteractiveState.hpp @@ -5,12 +5,12 @@ #include "../ui/ClientController.hpp" #include "ChunkReceiver.hpp" -#include "ChunkRequester.hpp" +#include "NetworkedInput.hpp" #include "../app/IntervalTimer.hpp" #include "../graphics/SkyBox.hpp" #include "../io/WorldSave.hpp" #include "../model/Skeletons.hpp" -#include "../ui/DirectInput.hpp" +#include "../net/Packet.hpp" #include "../ui/HUD.hpp" #include "../ui/InteractiveManipulator.hpp" #include "../ui/Interface.hpp" @@ -20,8 +20,6 @@ #include "../world/Player.hpp" #include "../world/World.hpp" -#include - namespace blank { @@ -49,8 +47,8 @@ public: void Update(int dt) override; void Render(Viewport &) override; - void PushPlayerUpdate(const Entity &, int dt); void MergePlayerCorrection(std::uint16_t, const EntityState &); + void Handle(const Packet::BlockUpdate &); void SetAudio(bool) override; void SetVideo(bool) override; @@ -66,9 +64,8 @@ private: Player &player; HUD hud; InteractiveManipulator manip; - DirectInput input; + NetworkedInput input; Interface interface; - ChunkRequester chunk_requester; ChunkReceiver chunk_receiver; ChunkRenderer chunk_renderer; Skeletons skeletons; @@ -76,15 +73,6 @@ private: SkyBox sky; - struct PlayerHistory { - EntityState state; - int delta_t; - std::uint16_t packet; - PlayerHistory(EntityState s, int dt, std::uint16_t p) - : state(s), delta_t(dt), packet(p) { } - }; - std::list player_hist; - }; }