summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-11-03 01:52:37 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2022-11-03 01:52:37 +0100
commit5907df680861e19091018c33979ebabe53d7ed72 (patch)
treee2e7414844d31072477c51b801b820bab441d196 /src/ChunkMap.cpp
parentUpdate Core Plugin (#5453) (diff)
downloadcuberite-5907df680861e19091018c33979ebabe53d7ed72.tar
cuberite-5907df680861e19091018c33979ebabe53d7ed72.tar.gz
cuberite-5907df680861e19091018c33979ebabe53d7ed72.tar.bz2
cuberite-5907df680861e19091018c33979ebabe53d7ed72.tar.lz
cuberite-5907df680861e19091018c33979ebabe53d7ed72.tar.xz
cuberite-5907df680861e19091018c33979ebabe53d7ed72.tar.zst
cuberite-5907df680861e19091018c33979ebabe53d7ed72.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 16e8fa267..7dd7901fd 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1347,7 +1347,10 @@ void cChunkMap::Tick(std::chrono::milliseconds a_Dt)
// Do the magic of updating the world:
for (auto & Chunk : m_Chunks)
{
- Chunk.second.Tick(a_Dt);
+ if (Chunk.second.ShouldBeTicked())
+ {
+ Chunk.second.Tick(a_Dt);
+ }
}
// Finally, only after all chunks are ticked, tell the client about all aggregated changes: