summaryrefslogtreecommitdiffstats
path: root/source/Simulator
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 12:42:47 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-18 12:42:47 +0200
commit7aa87d18189536e548e02bfd1e2a6e368f2f7fb1 (patch)
tree3bc18b6d22ea27181a5e43ddba15ddc17cc81fbb /source/Simulator
parentAdded basic spawn eggs (patch contributed by Luksor) (diff)
downloadcuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.gz
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.bz2
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.lz
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.xz
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.tar.zst
cuberite-7aa87d18189536e548e02bfd1e2a6e368f2f7fb1.zip
Diffstat (limited to 'source/Simulator')
-rw-r--r--source/Simulator/FloodyFluidSimulator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/Simulator/FloodyFluidSimulator.cpp b/source/Simulator/FloodyFluidSimulator.cpp
index 25b43606b..0f100116d 100644
--- a/source/Simulator/FloodyFluidSimulator.cpp
+++ b/source/Simulator/FloodyFluidSimulator.cpp
@@ -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.