]> git.localhorst.tv Git - blank.git/blobdiff - src/client/NetworkedInput.hpp
send updates less frequently on bad connections
[blank.git] / src / client / NetworkedInput.hpp
index b557b1b0b3eb289f92aa8e152d8398ea68ca5644..3a61d90910e785ec67ce7628ca8e1b1faabf7e8e 100644 (file)
@@ -20,6 +20,7 @@ class NetworkedInput
 public:
        explicit NetworkedInput(World &, Player &, Client &);
 
+       bool UpdateImportant() const noexcept;
        void Update(Entity &, float dt) override;
        void PushPlayerUpdate(int dt);
        void MergePlayerCorrection(std::uint16_t, const EntityState &);
@@ -44,6 +45,9 @@ private:
        };
        std::list<PlayerHistory> player_hist;
 
+       glm::vec3 old_movement;
+
+       std::uint8_t old_actions;
        std::uint8_t actions;
 
 };