From 72ae5ecb5a5a8585935be6a954f480a406550b5c Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 28 Aug 2020 21:22:44 +0100 Subject: ChunkMap: do not wantonly make empty chunks - Removed calls that constructed an empty chunk, found it was invalid, and did nothing with said chunk Partially addresses #2324 --- src/Simulator/Simulator.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/Simulator/Simulator.cpp') diff --git a/src/Simulator/Simulator.cpp b/src/Simulator/Simulator.cpp index 6b39b81d5..36b03520c 100644 --- a/src/Simulator/Simulator.cpp +++ b/src/Simulator/Simulator.cpp @@ -132,13 +132,6 @@ void cSimulator::WakeUp(const cCuboid & a_Area) { m_World.DoWithChunk(cx, cz, [this, &area](cChunk & a_CBChunk) -> bool { - if (!a_CBChunk.IsValid()) - { - LOGWARNING("%s: Trying to wake up inside a non-valid chunk [%d, %d]. Ignoring.", - __FUNCTION__, a_CBChunk.GetPosX(), a_CBChunk.GetPosZ() - ); - return true; - } int startX = std::max(area.p1.x, a_CBChunk.GetPosX() * cChunkDef::Width); int startZ = std::max(area.p1.z, a_CBChunk.GetPosZ() * cChunkDef::Width); int endX = std::min(area.p2.x, a_CBChunk.GetPosX() * cChunkDef::Width + cChunkDef::Width - 1); -- cgit v1.2.3