X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fserver%2FClientConnection.hpp;h=1a781c5dd6ad5dea7f88b033e4648bed6aee4550;hb=660c4216fc61c0d99987adbfea057af07b511a23;hp=4927d1ce831fb9ab26c15cbeb68db9826b3c497c;hpb=c1da86ebab41895bf49ed747c75ecf722e8c5586;p=blank.git diff --git a/src/server/ClientConnection.hpp b/src/server/ClientConnection.hpp index 4927d1c..1a781c5 100644 --- a/src/server/ClientConnection.hpp +++ b/src/server/ClientConnection.hpp @@ -19,7 +19,7 @@ namespace blank { -class CompositeModel; +class Model; namespace server { @@ -57,9 +57,11 @@ public: ChunkIndex &PlayerChunks() noexcept { return input->GetPlayer().GetChunks(); } const ChunkIndex &PlayerChunks() const noexcept { return input->GetPlayer().GetChunks(); } - void SetPlayerModel(const CompositeModel &) noexcept; + void SetPlayerModel(const Model &) noexcept; bool HasPlayerModel() const noexcept; - const CompositeModel &GetPlayerModel() const noexcept; + const Model &GetPlayerModel() const noexcept; + + bool ChunkInRange(const glm::ivec3 &) const noexcept; private: struct SpawnStatus { @@ -81,6 +83,7 @@ private: void On(const Packet::Login &) override; void On(const Packet::Part &) override; void On(const Packet::PlayerUpdate &) override; + void On(const Packet::Message &) override; bool CanSpawn(const Entity &) const noexcept; bool CanDespawn(const Entity &) const noexcept; @@ -98,7 +101,7 @@ private: Server &server; Connection conn; std::unique_ptr input; - const CompositeModel *player_model; + const Model *player_model; std::list spawns; unsigned int confirm_wait;