summaryrefslogtreecommitdiffstats
path: root/src/RendererWorld.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 06:10:33 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-01-27 06:10:33 +0100
commite2479261c56c8d1a64b51ad4f084ad3c18505359 (patch)
tree5256688eaec174cebdcf873f5247ece28ec45b9c /src/RendererWorld.hpp
parentAdded slow GameState sync (diff)
downloadAltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.gz
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.bz2
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.lz
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.xz
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.tar.zst
AltCraft-e2479261c56c8d1a64b51ad4f084ad3c18505359.zip
Diffstat (limited to 'src/RendererWorld.hpp')
-rw-r--r--src/RendererWorld.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/RendererWorld.hpp b/src/RendererWorld.hpp
index dbdd852..5148964 100644
--- a/src/RendererWorld.hpp
+++ b/src/RendererWorld.hpp
@@ -27,7 +27,7 @@ class RendererWorld {
};
//General
- GameState *gs;
+ std::shared_ptr<GameState> gs;
std::unique_ptr<EventListener> listener;
size_t numOfWorkers;
size_t currentWorker = 0;
@@ -50,7 +50,7 @@ class RendererWorld {
Texture *skyTexture;
RendererSky rendererSky;
public:
- RendererWorld(GameState* ptr);
+ RendererWorld(std::shared_ptr<GameState> ptr);
~RendererWorld();
void Render(RenderState& renderState);
@@ -63,4 +63,8 @@ public:
GameState *GameStatePtr();
int culledSections = 0;
+
+ inline void UpdateGameState(std::shared_ptr<GameState> newPtr) {
+ gs = newPtr;
+ }
}; \ No newline at end of file