summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-07 00:50:22 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-07 00:50:22 +0200
commit9e44b0aae164f2456a452714f869cc9670732d8e (patch)
tree952cf9c8aca9c1b200b8285586e48e50a0188667 /src/ChunkMap.cpp
parentFixed OpenSSL programs and tests being generated when testing disabled. (diff)
downloadcuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.gz
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.bz2
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.lz
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.xz
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.zst
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index c9fb0b59e..c53211b6b 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -847,7 +847,22 @@ void cChunkMap::WakeUpSimulatorsInArea(int a_MinBlockX, int a_MaxBlockX, int a_M
-void cChunkMap::MarkChunkDirty (int a_ChunkX, int a_ChunkZ)
+void cChunkMap::MarkRedstoneDirty(int a_ChunkX, int a_ChunkZ)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ);
+ if ((Chunk == NULL) || !Chunk->IsValid())
+ {
+ return;
+ }
+ Chunk->SetIsRedstoneDirty(true);
+}
+
+
+
+
+
+void cChunkMap::MarkChunkDirty(int a_ChunkX, int a_ChunkZ, bool a_MarkRedstoneDirty)
{
cCSLock Lock(m_CSLayers);
cChunkPtr Chunk = GetChunkNoGen(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ);
@@ -856,6 +871,10 @@ void cChunkMap::MarkChunkDirty (int a_ChunkX, int a_ChunkZ)
return;
}
Chunk->MarkDirty();
+ if (a_MarkRedstoneDirty)
+ {
+ Chunk->SetIsRedstoneDirty(true);
+ }
}