X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2FMasterState.hpp;h=1d69998b58f3432f656a78906142704384977921;hb=9da6ac5e93d79e79658a95d5f6efe42146873583;hp=61069dc5aa7136eb8be750bce26ece226ebef708;hpb=68f47f2824989b21ff9a480a367a6d0a41804f41;p=blank.git diff --git a/src/client/MasterState.hpp b/src/client/MasterState.hpp index 61069dc..1d69998 100644 --- a/src/client/MasterState.hpp +++ b/src/client/MasterState.hpp @@ -1,12 +1,14 @@ #ifndef BLANK_CLIENT_CLIENTSTATE_HPP_ #define BLANK_CLIENT_CLIENTSTATE_HPP_ -#include "InitialState.hpp" -#include "InteractiveState.hpp" #include "../app/State.hpp" -#include "../net/Client.hpp" #include "../net/ConnectionHandler.hpp" +#include "Client.hpp" +#include "InitialState.hpp" +#include "InteractiveState.hpp" +#include "../app/Config.hpp" + #include #include @@ -26,18 +28,18 @@ class MasterState public: MasterState( Environment &, - const World::Config &, - const Interface::Config &, - const Client::Config & + Config &, + const World::Config & ); Client &GetClient() noexcept { return client; } Environment &GetEnv() noexcept { return env; } + Config &GetConfig() noexcept { return config; } + const Config &GetConfig() const noexcept { return config; } + World::Config &GetWorldConf() noexcept { return world_conf; } const World::Config &GetWorldConf() const noexcept { return world_conf; } - const Interface::Config &GetInterfaceConf() const noexcept { return intf_conf; } - const Client::Config &GetClientConf() const noexcept { return client_conf; } void Quit(); @@ -55,6 +57,10 @@ public: void On(const Packet::SpawnEntity &) override; void On(const Packet::DespawnEntity &) override; void On(const Packet::EntityUpdate &) override; + void On(const Packet::PlayerCorrection &) override; + void On(const Packet::ChunkBegin &) override; + void On(const Packet::ChunkData &) override; + void On(const Packet::BlockUpdate &) override; private: /// flag entity as updated by given packet @@ -65,9 +71,8 @@ private: private: Environment &env; + Config &config; World::Config world_conf; - const Interface::Config &intf_conf; - const Client::Config &client_conf; std::unique_ptr state; Client client;