summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-09-26 19:14:22 +0200
committerTycho <work.tycho+git@gmail.com>2014-09-26 19:14:22 +0200
commit0e141923bb05af8b134be30b4da544df5d76a0e1 (patch)
tree9f48ea17aad861fa1a3ecb828d3b026f237da461
parentRemoved more unessicary includes (diff)
parentFixed issue with casting (diff)
downloadcuberite-0e141923bb05af8b134be30b4da544df5d76a0e1.tar
cuberite-0e141923bb05af8b134be30b4da544df5d76a0e1.tar.gz
cuberite-0e141923bb05af8b134be30b4da544df5d76a0e1.tar.bz2
cuberite-0e141923bb05af8b134be30b4da544df5d76a0e1.tar.lz
cuberite-0e141923bb05af8b134be30b4da544df5d76a0e1.tar.xz
cuberite-0e141923bb05af8b134be30b4da544df5d76a0e1.tar.zst
cuberite-0e141923bb05af8b134be30b4da544df5d76a0e1.zip
-rw-r--r--src/Chunk.cpp3
-rw-r--r--src/Chunk.h4
-rw-r--r--src/Simulator/RedstoneSimulator.h4
3 files changed, 8 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 74e18de17..3012f30b6 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -92,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)
@@ -160,6 +161,8 @@ cChunk::~cChunk()
m_WaterSimulatorData = NULL;
delete m_LavaSimulatorData;
m_LavaSimulatorData = NULL;
+ delete m_RedstoneSimulatorData;
+ m_RedstoneSimulatorData = NULL;
}
diff --git a/src/Chunk.h b/src/Chunk.h
index 1d62ff73f..b525fbb82 100644
--- a/src/Chunk.h
+++ b/src/Chunk.h
@@ -420,7 +420,7 @@ public:
cFluidSimulatorData * GetLavaSimulatorData (void) { return m_LavaSimulatorData; }
cSandSimulatorChunkData & GetSandSimulatorData (void) { return m_SandSimulatorData; }
- cRedstoneSimulatorChunkData * GetRedstoneSimulatorData(void) { return &m_RedstoneSimulatorData; }
+ cRedstoneSimulatorChunkData * GetRedstoneSimulatorData(void) { return m_RedstoneSimulatorData; }
bool IsRedstoneDirty(void) const { return m_IsRedstoneDirty; }
void SetIsRedstoneDirty(bool a_Flag) { m_IsRedstoneDirty = a_Flag; }
@@ -505,7 +505,7 @@ private:
cFluidSimulatorData * m_LavaSimulatorData;
cSandSimulatorChunkData m_SandSimulatorData;
- cRedstoneSimulatorChunkData m_RedstoneSimulatorData;
+ cRedstoneSimulatorChunkData * m_RedstoneSimulatorData;
/** Indicates if simulate-once blocks should be updated by the redstone simulator */
diff --git a/src/Simulator/RedstoneSimulator.h b/src/Simulator/RedstoneSimulator.h
index 0e3dd495d..f6d36f869 100644
--- a/src/Simulator/RedstoneSimulator.h
+++ b/src/Simulator/RedstoneSimulator.h
@@ -7,10 +7,12 @@
class cRedstoneSimulatorChunkData
{
public:
- virtual ~cRedstoneSimulatorChunkData() {}
+ virtual ~cRedstoneSimulatorChunkData() = 0;
} ;
+inline cRedstoneSimulatorChunkData::~cRedstoneSimulatorChunkData() {}
+
template <class ChunkType, class WorldType>
class cRedstoneSimulator :
public cSimulator<ChunkType, WorldType>