summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 3b82d9e97..ed29123b8 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -226,6 +226,7 @@ cWorld::cWorld(
cFile::CreateFolderRecursive(m_DataPath);
+ // TODO: unique ptr unnecessary
m_ChunkMap = std::make_unique<cChunkMap>(this);
m_ChunkMap->TrackInDeadlockDetect(a_DeadlockDetect, m_WorldName);
@@ -964,11 +965,6 @@ void cWorld::Stop(cDeadlockDetect & a_DeadlockDetect)
m_MapManager.SaveMapData();
}
-
- // Explicitly destroy the chunkmap, so that it's guaranteed to be destroyed before the other internals
- // This fixes crashes on stopping the server, because chunk destructor deletes entities and those access the world.
- // TODO: destructors should only be used for releasing resources, not doing extra work
- m_ChunkMap.reset();
}