1 #ifndef BLANK_CLIENT_NETWORKEDINPUT_HPP_
2 #define BLANK_CLIENT_NETWORKEDINPUT_HPP_
4 #include "../ui/PlayerController.hpp"
6 #include "../world/EntityState.hpp"
18 : public PlayerController {
21 explicit NetworkedInput(World &, Player &, Client &);
23 bool UpdateImportant() const noexcept;
24 void Update(Entity &, float dt) override;
25 void PushPlayerUpdate(int dt);
26 void MergePlayerCorrection(std::uint16_t, const EntityState &);
28 void StartPrimaryAction() override;
29 void StopPrimaryAction() override;
30 void StartSecondaryAction() override;
31 void StopSecondaryAction() override;
32 void StartTertiaryAction() override;
33 void StopTertiaryAction() override;
38 struct PlayerHistory {
43 PlayerHistory(EntityState s, const glm::vec3 &mv, float dt, std::uint16_t p)
44 : state(s), movement(mv), delta_t(dt), packet(p) { }
46 std::list<PlayerHistory> player_hist;
48 glm::vec3 old_movement;
50 std::uint8_t old_actions;