1
0

Made constants in cChunkDef enums, compilation fixes for gcc.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@974 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-10-18 10:42:47 +00:00
parent 84da8a2353
commit 7aa87d1818
2 changed files with 14 additions and 10 deletions

View File

@@ -42,7 +42,8 @@ void cFloodyFluidSimulator::SimulateBlock(int a_BlockX, int a_BlockY, int a_Bloc
cBlockArea Area;
int MinBlockY = std::max(0, a_BlockY - 1);
int MaxBlockY = std::min(cChunkDef::Height, a_BlockY + 1);
int ChunkHeight = cChunkDef::Height; // Stupid compilers wouldn't let me use std::min(cChunkDef::Height, ...)
int MaxBlockY = std::min(ChunkHeight, a_BlockY + 1);
if (!Area.Read(m_World, a_BlockX - 1, a_BlockX + 1, MinBlockY, MaxBlockY, a_BlockZ - 1, a_BlockZ + 1))
{
// Cannot read the immediate neighborhood, probably too close to an unloaded chunk. Bail out.