X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2FInteractiveState.hpp;h=dc84199c6be49025b35fe42a1feb1e6248d5bd8d;hb=1d225566f79566e2dbbad8cb2876696f4c074ff5;hp=49c54745f8f88c57b94af1b52d6a7f72fb12fd68;hpb=ca90ec459ca0bd48c1483a45f30496aed61e9c21;p=blank.git diff --git a/src/client/InteractiveState.hpp b/src/client/InteractiveState.hpp index 49c5474..dc84199 100644 --- a/src/client/InteractiveState.hpp +++ b/src/client/InteractiveState.hpp @@ -6,6 +6,7 @@ #include "ChunkReceiver.hpp" #include "NetworkedInput.hpp" +#include "../app/ChatState.hpp" #include "../app/IntervalTimer.hpp" #include "../audio/SoundBank.hpp" #include "../graphics/SkyBox.hpp" @@ -31,7 +32,8 @@ class MasterState; class InteractiveState : public State -, public ClientController { +, public ClientController +, public ChatState::Responder { public: explicit InteractiveState(MasterState &, std::uint32_t player_id); @@ -52,6 +54,7 @@ public: void Handle(const Packet::EntityUpdate &); void Handle(const Packet::PlayerCorrection &); void Handle(const Packet::BlockUpdate &); + void Handle(const Packet::Message &); void SetAudio(bool) override; void SetVideo(bool) override; @@ -59,6 +62,8 @@ public: void SetDebug(bool) override; void Exit() override; + void OnLineSubmit(const std::string &) override; + private: /// flag entity as updated by given packet /// returns false if the update should be ignored @@ -89,6 +94,8 @@ private: }; std::map update_status; + ChatState chat; + }; }