summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-26 22:23:36 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-26 22:23:36 +0200
commitaf997a09ca1ff2bf3e93f9145edc50d29be28529 (patch)
tree8188753488f633407eea5aab0c9e6e0833300e43 /src/Chunk.cpp
parentFixed players custom name in 1.8 (diff)
parentMerge pull request #1455 from mc-server/includes (diff)
downloadcuberite-af997a09ca1ff2bf3e93f9145edc50d29be28529.tar
cuberite-af997a09ca1ff2bf3e93f9145edc50d29be28529.tar.gz
cuberite-af997a09ca1ff2bf3e93f9145edc50d29be28529.tar.bz2
cuberite-af997a09ca1ff2bf3e93f9145edc50d29be28529.tar.lz
cuberite-af997a09ca1ff2bf3e93f9145edc50d29be28529.tar.xz
cuberite-af997a09ca1ff2bf3e93f9145edc50d29be28529.tar.zst
cuberite-af997a09ca1ff2bf3e93f9145edc50d29be28529.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 8b2655cc9..3012f30b6 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -38,6 +38,7 @@
#include "BlockInServerPluginInterface.h"
#include "SetChunkData.h"
#include "BoundingBox.h"
+#include "Blocks/ChunkInterface.h"
#include "json/json.h"
@@ -91,6 +92,7 @@ cChunk::cChunk(
m_NeighborZP(a_NeighborZP),
m_WaterSimulatorData(a_World->GetWaterSimulator()->CreateChunkData()),
m_LavaSimulatorData (a_World->GetLavaSimulator ()->CreateChunkData()),
+ m_RedstoneSimulatorData(NULL),
m_AlwaysTicked(0)
{
if (a_NeighborXM != NULL)
@@ -159,6 +161,8 @@ cChunk::~cChunk()
m_WaterSimulatorData = NULL;
delete m_LavaSimulatorData;
m_LavaSimulatorData = NULL;
+ delete m_RedstoneSimulatorData;
+ m_RedstoneSimulatorData = NULL;
}
@@ -1366,9 +1370,9 @@ void cChunk::CreateBlockEntities(void)
void cChunk::WakeUpSimulators(void)
{
- cSimulator * WaterSimulator = m_World->GetWaterSimulator();
- cSimulator * LavaSimulator = m_World->GetLavaSimulator();
- cSimulator * RedstoneSimulator = m_World->GetRedstoneSimulator();
+ cSimulator<cChunk, cWorld> * WaterSimulator = m_World->GetWaterSimulator();
+ cSimulator<cChunk, cWorld> * LavaSimulator = m_World->GetLavaSimulator();
+ cSimulator<cChunk, cWorld> * RedstoneSimulator = m_World->GetRedstoneSimulator();
int BaseX = m_PosX * cChunkDef::Width;
int BaseZ = m_PosZ * cChunkDef::Width;
for (int x = 0; x < Width; x++)