commit
28ebe11df2
@ -421,6 +421,7 @@ public:
|
||||
cSandSimulatorChunkData & GetSandSimulatorData (void) { return m_SandSimulatorData; }
|
||||
|
||||
cRedstoneSimulatorChunkData * GetRedstoneSimulatorData(void) { return m_RedstoneSimulatorData; }
|
||||
void SetRedstoneSimulatorData(cRedstoneSimulatorChunkData * a_Data) { m_RedstoneSimulatorData = a_Data; }
|
||||
bool IsRedstoneDirty(void) const { return m_IsRedstoneDirty; }
|
||||
void SetIsRedstoneDirty(bool a_Flag) { m_IsRedstoneDirty = a_Flag; }
|
||||
|
||||
|
@ -77,7 +77,7 @@ private:
|
||||
};
|
||||
|
||||
class cIncrementalRedstoneSimulatorChunkData :
|
||||
cRedstoneSimulatorChunkData
|
||||
public cRedstoneSimulatorChunkData
|
||||
{
|
||||
public:
|
||||
/// Per-chunk data for the simulator, specified individual chunks to simulate
|
||||
@ -554,6 +554,11 @@ template <class ChunkType, class WorldType, template <BLOCKTYPE block> class Get
|
||||
void cIncrementalRedstoneSimulator<ChunkType, WorldType, GetHandlerCompileTime, ChestType>::SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, ChunkType * a_Chunk)
|
||||
{
|
||||
m_RedstoneSimulatorChunkData = (cIncrementalRedstoneSimulator<ChunkType, WorldType, GetHandlerCompileTime, ChestType>::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData();
|
||||
if (m_RedstoneSimulatorChunkData == NULL)
|
||||
{
|
||||
m_RedstoneSimulatorChunkData = new cIncrementalRedstoneSimulator<ChunkType, WorldType, GetHandlerCompileTime, ChestType>::cIncrementalRedstoneSimulatorChunkData();
|
||||
a_Chunk->SetRedstoneSimulatorData(m_RedstoneSimulatorChunkData);
|
||||
}
|
||||
if (m_RedstoneSimulatorChunkData->m_ChunkData.empty() && ((cIncrementalRedstoneSimulator<ChunkType, WorldType, GetHandlerCompileTime, ChestType>::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData())->m_QueuedChunkData.empty())
|
||||
{
|
||||
return;
|
||||
|
@ -99,6 +99,7 @@ class MockChunk
|
||||
{
|
||||
public:
|
||||
cRedstoneSimulatorChunkData * GetRedstoneSimulatorData() { return NULL; }
|
||||
void SetRedstoneSimulatorData(cRedstoneSimulatorChunkData * a_Data) {}
|
||||
bool IsRedstoneDirty() { return true; }
|
||||
void SetIsRedstoneDirty(bool a_Param) {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user