summaryrefslogtreecommitdiffstats
path: root/source/World.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-01 22:56:25 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-01 22:56:25 +0200
commit578560d2132188279e4b0930212edd915bc90008 (patch)
tree2519ecc38e0124bd58916b409f9222ee410c7e5e /source/World.cpp
parentHotfix for FS #347. (diff)
downloadcuberite-578560d2132188279e4b0930212edd915bc90008.tar
cuberite-578560d2132188279e4b0930212edd915bc90008.tar.gz
cuberite-578560d2132188279e4b0930212edd915bc90008.tar.bz2
cuberite-578560d2132188279e4b0930212edd915bc90008.tar.lz
cuberite-578560d2132188279e4b0930212edd915bc90008.tar.xz
cuberite-578560d2132188279e4b0930212edd915bc90008.tar.zst
cuberite-578560d2132188279e4b0930212edd915bc90008.zip
Diffstat (limited to 'source/World.cpp')
-rw-r--r--source/World.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/World.cpp b/source/World.cpp
index a573653d7..bef797e06 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -1599,18 +1599,18 @@ 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
+ );
+
+ // Initialize the entities (outside the m_ChunkMap's CS, to fix FS #347):
+ for (cEntityList::iterator itr = a_Entities.begin(), end = a_Entities.end(); itr != end; ++itr)
{
- // _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
- );
+ (*itr)->Initialize(this);
}
// If a client is requesting this chunk, send it to them: