diff options
author | Alexander Lyons Harkness <me@bearbin.net> | 2017-12-23 13:49:08 +0100 |
---|---|---|
committer | Alexander Lyons Harkness <me@bearbin.net> | 2017-12-24 15:23:23 +0100 |
commit | 1926181cb7c8570fe57ec1b39d4241b9dd156333 (patch) | |
tree | 8ac9c6f24285846fa3f97f0a4ade9b0f9996f295 /Tools/BlockZapper/Regions.cpp | |
parent | Fixed item ID raw rabbit (#4103) (diff) | |
download | cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.gz cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.bz2 cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.lz cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.xz cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.zst cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.zip |
Diffstat (limited to 'Tools/BlockZapper/Regions.cpp')
-rw-r--r-- | Tools/BlockZapper/Regions.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Tools/BlockZapper/Regions.cpp b/Tools/BlockZapper/Regions.cpp index 515699532..7a205a138 100644 --- a/Tools/BlockZapper/Regions.cpp +++ b/Tools/BlockZapper/Regions.cpp @@ -11,7 +11,7 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // cRegion: cRegion::cRegion(void) : @@ -66,7 +66,7 @@ bool cRegion::TouchesChunk(int a_ChunkX, int a_ChunkZ) const -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // cRegions: void cRegions::Read(std::istream & a_Stream) @@ -75,7 +75,7 @@ void cRegions::Read(std::istream & a_Stream) { AString Line; std::getline(a_Stream, Line); - + // Process the line AStringVector Split = StringSplit(Line, " \t"); AStringVector NonEmpty; @@ -110,7 +110,7 @@ void cRegions::Read(std::istream & a_Stream) void cRegions::AddRegion(const AStringVector & a_Split) { ASSERT((a_Split.size() == 6) || (a_Split.size() == 7)); - + int Coords[6]; for (int i = 0; i < 6; i++) { @@ -121,10 +121,10 @@ void cRegions::AddRegion(const AStringVector & a_Split) return; } } // for i - a_Split[] - + bool ShouldZapBlocks = true; bool ShouldZapEntities = false; - + if (a_Split.size() == 7) { AString Upper = a_Split[6]; @@ -148,7 +148,7 @@ void cRegions::AddRegion(const AStringVector & a_Split) return; } } - + // Swap coords, if needed: for (int i = 0; i < 3; i++) { @@ -157,11 +157,7 @@ void cRegions::AddRegion(const AStringVector & a_Split) std::swap(Coords[2 * i], Coords[2 * i + 1]); } } - + // Store the region m_Regions.push_back(cRegion(Coords[0], Coords[1], Coords[2], Coords[3], Coords[4], Coords[5], ShouldZapBlocks, ShouldZapEntities)); } - - - - |