1
0
Fork 0

The cuboid for cWorld::SetAreaBiome() doesn't need sorting.

This commit is contained in:
madmaxoft 2014-02-18 13:44:40 +01:00
parent 71b6fd3da9
commit b1c6b4f584
2 changed files with 7 additions and 2 deletions

View File

@ -1507,7 +1507,11 @@ bool cWorld::SetAreaBiome(int a_MinX, int a_MaxX, int a_MinZ, int a_MaxZ, EMCSBi
bool cWorld::SetAreaBiome(const cCuboid & a_Area, EMCSBiome a_Biome)
{
return SetAreaBiome(a_Area.p1.x, a_Area.p2.x, a_Area.p1.z, a_Area.p2.z, a_Biome);
return SetAreaBiome(
std::min(a_Area.p1.x, a_Area.p2.x), std::max(a_Area.p1.x, a_Area.p2.x),
std::min(a_Area.p1.z, a_Area.p2.z), std::max(a_Area.p1.z, a_Area.p2.z),
a_Biome
);
}

View File

@ -565,7 +565,8 @@ public:
bool SetAreaBiome(int a_MinX, int a_MaxX, int a_MinZ, int a_MaxZ, EMCSBiome a_Biome);
/** Sets the biome at the area. Returns true if successful, false if any subarea failed (chunk not loaded).
(Re)sends the chunks to their relevant clients if successful. */
(Re)sends the chunks to their relevant clients if successful.
The cuboid needn't be sorted. */
bool SetAreaBiome(const cCuboid & a_Area, EMCSBiome a_Biome);
/** Returns the name of the world */