summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-01 20:24:05 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-01 20:24:05 +0200
commit47b9f6d941a1a1e595834f8a95defc74f3e363f3 (patch)
treedf808aa709f14bb8b97c3e4a6d4830d8d5261ef7
parentPawn, Player: fixed asserts when teleporting players outside of the world (setting spawn Y to 256) (diff)
downloadcuberite-47b9f6d941a1a1e595834f8a95defc74f3e363f3.tar
cuberite-47b9f6d941a1a1e595834f8a95defc74f3e363f3.tar.gz
cuberite-47b9f6d941a1a1e595834f8a95defc74f3e363f3.tar.bz2
cuberite-47b9f6d941a1a1e595834f8a95defc74f3e363f3.tar.lz
cuberite-47b9f6d941a1a1e595834f8a95defc74f3e363f3.tar.xz
cuberite-47b9f6d941a1a1e595834f8a95defc74f3e363f3.tar.zst
cuberite-47b9f6d941a1a1e595834f8a95defc74f3e363f3.zip
Diffstat (limited to '')
-rw-r--r--source/World.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/source/World.cpp b/source/World.cpp
index 3f5e604bf..a573653d7 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -1599,13 +1599,19 @@ void cWorld::SetChunkData(
m_Generator.GenerateBiomes(a_ChunkX, a_ChunkZ, BiomeMap);
}
- m_ChunkMap->SetChunkData(
- a_ChunkX, a_ChunkY, a_ChunkZ,
- a_BlockTypes, a_BlockMeta, a_BlockLight, a_BlockSkyLight,
- a_HeightMap, *Biomes,
- a_Entities, a_BlockEntities,
- a_MarkDirty
- );
+ {
+ // _X: 2013_04_01: Hotfix for FS #347 - deadlock between the anvil loader thread and the tick thread
+ // By locking the entities here, we break one of the 3 conditions needed for the deadlock
+ cCSLock Lock(m_CSEntities);
+
+ m_ChunkMap->SetChunkData(
+ a_ChunkX, a_ChunkY, a_ChunkZ,
+ a_BlockTypes, a_BlockMeta, a_BlockLight, a_BlockSkyLight,
+ a_HeightMap, *Biomes,
+ a_Entities, a_BlockEntities,
+ a_MarkDirty
+ );
+ }
// If a client is requesting this chunk, send it to them:
if (m_ChunkMap->HasChunkAnyClients(a_ChunkX, a_ChunkY, a_ChunkZ))