]> git.localhorst.tv Git - blank.git/blobdiff - src/client/InteractiveState.hpp
move client update throttling to state
[blank.git] / src / client / InteractiveState.hpp
index e679eb2990a5f47f285eee7eef3202776e71e83f..9b1ce52236309d23751286b037e2d80ead35701f 100644 (file)
@@ -1,8 +1,10 @@
 #ifndef BLANK_CLIENT_INTERACTIVESTATE_HPP_
 #define BLANK_CLIENT_INTERACTIVESTATE_HPP_
 
+#include "../app/IntervalTimer.hpp"
 #include "../app/State.hpp"
 #include "../io/WorldSave.hpp"
+#include "../model/Skeletons.hpp"
 #include "../ui/Interface.hpp"
 #include "../world/BlockTypeRegistry.hpp"
 #include "../world/ChunkRenderer.hpp"
@@ -21,10 +23,11 @@ class InteractiveState
 : public State {
 
 public:
-       explicit InteractiveState(MasterState &);
+       explicit InteractiveState(MasterState &, std::uint32_t player_id);
 
        World &GetWorld() noexcept { return world; }
        Interface &GetInterface() noexcept { return interface; }
+       Skeletons &GetSkeletons() noexcept { return skeletons; }
 
        void OnEnter() override;
 
@@ -37,8 +40,10 @@ private:
        BlockTypeRegistry block_types;
        WorldSave save;
        World world;
-       ChunkRenderer chunk_renderer;
        Interface interface;
+       ChunkRenderer chunk_renderer;
+       Skeletons skeletons;
+       IntervalTimer update_timer;
 
 };