From 94a0d04d58110d3a54669c0b7bbb7f0a618a60bd Mon Sep 17 00:00:00 2001 From: worktycho Date: Sat, 27 Sep 2014 14:49:03 +0100 Subject: Set chunk data --- src/Simulator/IncrementalRedstoneSimulator.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Simulator') diff --git a/src/Simulator/IncrementalRedstoneSimulator.inc b/src/Simulator/IncrementalRedstoneSimulator.inc index 6fda9824c..ba67d4014 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.inc +++ b/src/Simulator/IncrementalRedstoneSimulator.inc @@ -554,6 +554,11 @@ template class Get void cIncrementalRedstoneSimulator::SimulateChunk(float a_Dt, int a_ChunkX, int a_ChunkZ, ChunkType * a_Chunk) { m_RedstoneSimulatorChunkData = (cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData(); + if (m_RedstoneSimulatorChunkData == NULL) + { + m_RedstoneSimulatorChunkData = new cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData(); + a_Chunk->SetRedstoneChunkData(m_RedstoneSimulatorChunkData); + } if (m_RedstoneSimulatorChunkData->m_ChunkData.empty() && ((cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData())->m_QueuedChunkData.empty()) { return; -- cgit v1.2.3 From 20101fab996a8c84225508502cfbe8491a7bb0ac Mon Sep 17 00:00:00 2001 From: worktycho Date: Sat, 27 Sep 2014 15:04:08 +0100 Subject: Correct method name. --- src/Simulator/IncrementalRedstoneSimulator.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Simulator') diff --git a/src/Simulator/IncrementalRedstoneSimulator.inc b/src/Simulator/IncrementalRedstoneSimulator.inc index ba67d4014..c5cfbe3ed 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.inc +++ b/src/Simulator/IncrementalRedstoneSimulator.inc @@ -557,7 +557,7 @@ void cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData(); - a_Chunk->SetRedstoneChunkData(m_RedstoneSimulatorChunkData); + a_Chunk->SetRedstoneData(m_RedstoneSimulatorChunkData); } if (m_RedstoneSimulatorChunkData->m_ChunkData.empty() && ((cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData())->m_QueuedChunkData.empty()) { -- cgit v1.2.3 From 88a07bd18461e04ca57b049ac6dff7deada5d298 Mon Sep 17 00:00:00 2001 From: worktycho Date: Sat, 27 Sep 2014 15:19:32 +0100 Subject: Update IncrementalRedstoneSimulator.inc --- src/Simulator/IncrementalRedstoneSimulator.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Simulator') diff --git a/src/Simulator/IncrementalRedstoneSimulator.inc b/src/Simulator/IncrementalRedstoneSimulator.inc index c5cfbe3ed..299656b85 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.inc +++ b/src/Simulator/IncrementalRedstoneSimulator.inc @@ -557,7 +557,7 @@ void cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData(); - a_Chunk->SetRedstoneData(m_RedstoneSimulatorChunkData); + a_Chunk->SetRedstoneSimulatorData(m_RedstoneSimulatorChunkData); } if (m_RedstoneSimulatorChunkData->m_ChunkData.empty() && ((cIncrementalRedstoneSimulator::cIncrementalRedstoneSimulatorChunkData *)a_Chunk->GetRedstoneSimulatorData())->m_QueuedChunkData.empty()) { -- cgit v1.2.3 From cc73b70211ecab462edd373ebfd9f917250321c7 Mon Sep 17 00:00:00 2001 From: worktycho Date: Sat, 27 Sep 2014 15:24:01 +0100 Subject: Update IncrementalRedstoneSimulator.inc --- src/Simulator/IncrementalRedstoneSimulator.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Simulator') diff --git a/src/Simulator/IncrementalRedstoneSimulator.inc b/src/Simulator/IncrementalRedstoneSimulator.inc index 299656b85..adaa47967 100644 --- a/src/Simulator/IncrementalRedstoneSimulator.inc +++ b/src/Simulator/IncrementalRedstoneSimulator.inc @@ -77,7 +77,7 @@ private: }; class cIncrementalRedstoneSimulatorChunkData : - cRedstoneSimulatorChunkData + public cRedstoneSimulatorChunkData { public: /// Per-chunk data for the simulator, specified individual chunks to simulate -- cgit v1.2.3