summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-22 22:21:47 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-25 15:51:16 +0200
commit4519469547c0f8befe74e3e80a94efb0e076ba34 (patch)
treeb2e020631d1fbbfe0225d1c6a6a88dbc6eab124b /src/World.cpp
parentGrass spread: check chunk & light validity correctly (diff)
downloadcuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.gz
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.bz2
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.lz
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.xz
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.tar.zst
cuberite-4519469547c0f8befe74e3e80a94efb0e076ba34.zip
Diffstat (limited to '')
-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();
}