summaryrefslogtreecommitdiffstats
path: root/src/Simulator/IncrementalRedstoneSimulator.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-11 13:43:24 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-11 13:43:24 +0200
commit6a33fa84ae03ada5ddeb5861094a4030e612f827 (patch)
treebfc26735ff141460c8de6d2d54a57bdcca6c73ac /src/Simulator/IncrementalRedstoneSimulator.cpp
parentImproved LinkedPowering speed (diff)
downloadcuberite-6a33fa84ae03ada5ddeb5861094a4030e612f827.tar
cuberite-6a33fa84ae03ada5ddeb5861094a4030e612f827.tar.gz
cuberite-6a33fa84ae03ada5ddeb5861094a4030e612f827.tar.bz2
cuberite-6a33fa84ae03ada5ddeb5861094a4030e612f827.tar.lz
cuberite-6a33fa84ae03ada5ddeb5861094a4030e612f827.tar.xz
cuberite-6a33fa84ae03ada5ddeb5861094a4030e612f827.tar.zst
cuberite-6a33fa84ae03ada5ddeb5861094a4030e612f827.zip
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator.cpp')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.cpp b/src/Simulator/IncrementalRedstoneSimulator.cpp
index dbadbbb2c..141904530 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.cpp
+++ b/src/Simulator/IncrementalRedstoneSimulator.cpp
@@ -68,7 +68,10 @@ void cIncrementalRedstoneSimulator::RedstoneAddBlock(int a_BlockX, int a_BlockY,
RelX = a_BlockX - a_OtherChunk->GetPosX() * cChunkDef::Width;
RelZ = a_BlockZ - a_OtherChunk->GetPosZ() * cChunkDef::Width;
a_OtherChunk->GetBlockTypeMeta(RelX, a_BlockY, RelZ, Block, Meta);
- a_Chunk->SetIsRedstoneDirty(true); // When the second paramter is present, it means that the first belongs to a neighbouring chunk of the coordinates - alert this chunk for changes
+
+ // If a_OtherChunk is passed (not NULL), it is the chunk that had a block change, and a_Chunk will be the neighbouring chunk of that block
+ // Because said neighbouring chunk does not know of this change but still needs to update its redstone, we set it to dirty
+ a_Chunk->SetIsRedstoneDirty(true);
}
else
{