summaryrefslogtreecommitdiffstats
path: root/Tools/BlockZapper/Regions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/BlockZapper/Regions.cpp')
-rw-r--r--Tools/BlockZapper/Regions.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/Tools/BlockZapper/Regions.cpp b/Tools/BlockZapper/Regions.cpp
index 7a205a138..ec6f98545 100644
--- a/Tools/BlockZapper/Regions.cpp
+++ b/Tools/BlockZapper/Regions.cpp
@@ -30,7 +30,16 @@ cRegion::cRegion(void) :
-cRegion::cRegion(int a_MinX, int a_MaxX, int a_MinY, int a_MaxY, int a_MinZ, int a_MaxZ, bool a_ShouldZapBlocks, bool a_ShouldZapEntities) :
+cRegion::cRegion(
+ int a_MinX,
+ int a_MaxX,
+ int a_MinY,
+ int a_MaxY,
+ int a_MinZ,
+ int a_MaxZ,
+ bool a_ShouldZapBlocks,
+ bool a_ShouldZapEntities
+) :
m_MinX(a_MinX),
m_MaxX(a_MaxX),
m_MinY(std::max(0, std::min(255, a_MinY))),
@@ -52,10 +61,7 @@ bool cRegion::TouchesChunk(int a_ChunkX, int a_ChunkZ) const
int ChunkEndX = a_ChunkX * 16 + 15;
int ChunkBeginZ = a_ChunkZ * 16;
int ChunkEndZ = a_ChunkZ * 16 + 15;
- if (
- (m_MinX > ChunkEndX) || (m_MaxX < ChunkBeginX) ||
- (m_MinZ > ChunkEndZ) || (m_MaxZ < ChunkBeginZ)
- )
+ if ((m_MinX > ChunkEndX) || (m_MaxX < ChunkBeginX) || (m_MinZ > ChunkEndZ) || (m_MaxZ < ChunkBeginZ))
{
return false;
}
@@ -159,5 +165,7 @@ void cRegions::AddRegion(const AStringVector & a_Split)
}
// Store the region
- m_Regions.push_back(cRegion(Coords[0], Coords[1], Coords[2], Coords[3], Coords[4], Coords[5], ShouldZapBlocks, ShouldZapEntities));
+ m_Regions.push_back(
+ cRegion(Coords[0], Coords[1], Coords[2], Coords[3], Coords[4], Coords[5], ShouldZapBlocks, ShouldZapEntities)
+ );
}