Merge branch 'master' of https://github.com/mc-server/MCServer
This commit is contained in:
commit
0e141923bb
@ -92,6 +92,7 @@ cChunk::cChunk(
|
|||||||
m_NeighborZP(a_NeighborZP),
|
m_NeighborZP(a_NeighborZP),
|
||||||
m_WaterSimulatorData(a_World->GetWaterSimulator()->CreateChunkData()),
|
m_WaterSimulatorData(a_World->GetWaterSimulator()->CreateChunkData()),
|
||||||
m_LavaSimulatorData (a_World->GetLavaSimulator ()->CreateChunkData()),
|
m_LavaSimulatorData (a_World->GetLavaSimulator ()->CreateChunkData()),
|
||||||
|
m_RedstoneSimulatorData(NULL),
|
||||||
m_AlwaysTicked(0)
|
m_AlwaysTicked(0)
|
||||||
{
|
{
|
||||||
if (a_NeighborXM != NULL)
|
if (a_NeighborXM != NULL)
|
||||||
@ -160,6 +161,8 @@ cChunk::~cChunk()
|
|||||||
m_WaterSimulatorData = NULL;
|
m_WaterSimulatorData = NULL;
|
||||||
delete m_LavaSimulatorData;
|
delete m_LavaSimulatorData;
|
||||||
m_LavaSimulatorData = NULL;
|
m_LavaSimulatorData = NULL;
|
||||||
|
delete m_RedstoneSimulatorData;
|
||||||
|
m_RedstoneSimulatorData = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ public:
|
|||||||
cFluidSimulatorData * GetLavaSimulatorData (void) { return m_LavaSimulatorData; }
|
cFluidSimulatorData * GetLavaSimulatorData (void) { return m_LavaSimulatorData; }
|
||||||
cSandSimulatorChunkData & GetSandSimulatorData (void) { return m_SandSimulatorData; }
|
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; }
|
bool IsRedstoneDirty(void) const { return m_IsRedstoneDirty; }
|
||||||
void SetIsRedstoneDirty(bool a_Flag) { m_IsRedstoneDirty = a_Flag; }
|
void SetIsRedstoneDirty(bool a_Flag) { m_IsRedstoneDirty = a_Flag; }
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ private:
|
|||||||
cFluidSimulatorData * m_LavaSimulatorData;
|
cFluidSimulatorData * m_LavaSimulatorData;
|
||||||
cSandSimulatorChunkData m_SandSimulatorData;
|
cSandSimulatorChunkData m_SandSimulatorData;
|
||||||
|
|
||||||
cRedstoneSimulatorChunkData m_RedstoneSimulatorData;
|
cRedstoneSimulatorChunkData * m_RedstoneSimulatorData;
|
||||||
|
|
||||||
|
|
||||||
/** Indicates if simulate-once blocks should be updated by the redstone simulator */
|
/** Indicates if simulate-once blocks should be updated by the redstone simulator */
|
||||||
|
@ -7,10 +7,12 @@
|
|||||||
class cRedstoneSimulatorChunkData
|
class cRedstoneSimulatorChunkData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~cRedstoneSimulatorChunkData() {}
|
virtual ~cRedstoneSimulatorChunkData() = 0;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
inline cRedstoneSimulatorChunkData::~cRedstoneSimulatorChunkData() {}
|
||||||
|
|
||||||
template <class ChunkType, class WorldType>
|
template <class ChunkType, class WorldType>
|
||||||
class cRedstoneSimulator :
|
class cRedstoneSimulator :
|
||||||
public cSimulator<ChunkType, WorldType>
|
public cSimulator<ChunkType, WorldType>
|
||||||
|
Loading…
Reference in New Issue
Block a user