diff options
author | Mattes D <github@xoft.cz> | 2014-09-28 22:05:05 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-28 22:05:05 +0200 |
commit | 1422176d13d5eb22b44dcc81cd64a1dec6caede3 (patch) | |
tree | 61ea527ffe43611dc4fa9ce7d9dfffff99f825c8 | |
parent | Merge pull request #1466 from mc-server/endofsupport (diff) | |
parent | Update Chunk.cpp (diff) | |
download | cuberite-1422176d13d5eb22b44dcc81cd64a1dec6caede3.tar cuberite-1422176d13d5eb22b44dcc81cd64a1dec6caede3.tar.gz cuberite-1422176d13d5eb22b44dcc81cd64a1dec6caede3.tar.bz2 cuberite-1422176d13d5eb22b44dcc81cd64a1dec6caede3.tar.lz cuberite-1422176d13d5eb22b44dcc81cd64a1dec6caede3.tar.xz cuberite-1422176d13d5eb22b44dcc81cd64a1dec6caede3.tar.zst cuberite-1422176d13d5eb22b44dcc81cd64a1dec6caede3.zip |
-rw-r--r-- | src/Chunk.cpp | 2 | ||||
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator.inc | 5 | ||||
-rw-r--r-- | src/Simulator/NoopRedstoneSimulator.h | 5 | ||||
-rw-r--r-- | src/Simulator/RedstoneSimulator.h | 2 |
4 files changed, 13 insertions, 1 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index 3012f30b6..96b8eda4e 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -92,7 +92,7 @@ cChunk::cChunk( m_NeighborZP(a_NeighborZP), m_WaterSimulatorData(a_World->GetWaterSimulator()->CreateChunkData()), m_LavaSimulatorData (a_World->GetLavaSimulator ()->CreateChunkData()), - m_RedstoneSimulatorData(NULL), + m_RedstoneSimulatorData(a_World->GetRedstoneSimulator()->CreateChunkData()), m_AlwaysTicked(0) { if (a_NeighborXM != NULL) diff --git a/src/Simulator/IncrementalRedstoneSimulator.inc b/src/Simulator/IncrementalRedstoneSimulator.inc index 937e6b790..200fc0971 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.inc +++ b/src/Simulator/IncrementalRedstoneSimulator.inc @@ -27,6 +27,11 @@ public: { } ~cIncrementalRedstoneSimulator(); + + virtual cRedstoneSimulatorChunkData * CreateChunkData() override + { + return new cIncrementalRedstoneSimulatorChunkData; + } virtual void Simulate(float a_Dt) override { UNUSED(a_Dt);} // not used virtual void SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, ChunkType * a_Chunk) override; diff --git a/src/Simulator/NoopRedstoneSimulator.h b/src/Simulator/NoopRedstoneSimulator.h index 88e141e85..7c961f32b 100644 --- a/src/Simulator/NoopRedstoneSimulator.h +++ b/src/Simulator/NoopRedstoneSimulator.h @@ -36,5 +36,10 @@ public: UNUSED(a_BlockZ); UNUSED(a_Chunk); } + + virtual cRedstoneSimulatorChunkData * CreateChunkData() override + { + return NULL; + } } ; diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h index f6d36f869..6104d39b4 100644 --- a/src/Simulator/RedstoneSimulator.h +++ b/src/Simulator/RedstoneSimulator.h @@ -24,5 +24,7 @@ public: super(a_World) { } + + virtual cRedstoneSimulatorChunkData * CreateChunkData() = 0; } ; |