summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-27 23:22:15 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-27 23:22:15 +0200
commit8866a28cf835fd3f814d4413ab2b5883999e2065 (patch)
tree343c757980b219b25eab9182fb8f1ede59d59468 /src/Chunk.cpp
parentcPressurePlateHandler: Fix uninitialised variables. (#4047) (diff)
downloadcuberite-8866a28cf835fd3f814d4413ab2b5883999e2065.tar
cuberite-8866a28cf835fd3f814d4413ab2b5883999e2065.tar.gz
cuberite-8866a28cf835fd3f814d4413ab2b5883999e2065.tar.bz2
cuberite-8866a28cf835fd3f814d4413ab2b5883999e2065.tar.lz
cuberite-8866a28cf835fd3f814d4413ab2b5883999e2065.tar.xz
cuberite-8866a28cf835fd3f814d4413ab2b5883999e2065.tar.zst
cuberite-8866a28cf835fd3f814d4413ab2b5883999e2065.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 0ce18c45e..8d88ed3a4 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -452,14 +452,15 @@ void cChunk::WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlock
} // for y
// Erase all affected block entities:
- cCuboid affectedArea(
- {OffX, a_MinBlockY, OffZ},
- {OffX + SizeX - 1, a_MinBlockY + SizeY - 1, OffZ + SizeZ - 1}
+ cCuboid affectedArea( // In world coordinates
+ {BlockStartX, a_MinBlockY, BlockStartZ},
+ {BlockEndX, a_MinBlockY + SizeY - 1, BlockEndZ}
);
for (auto itr = m_BlockEntities.begin(); itr != m_BlockEntities.end();)
{
if (affectedArea.IsInside(itr->second->GetPos()))
{
+ delete itr->second;
itr = m_BlockEntities.erase(itr);
}
else