diff options
author | Mattes D <github@xoft.cz> | 2014-07-19 13:31:35 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-07-19 13:31:35 +0200 |
commit | c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc (patch) | |
tree | a8de103269fb7ef98a726e51bf8fcdfd17702ab9 /src/Mobs | |
parent | Merge pull request #1224 from mc-server/fixes-potions (diff) | |
parent | World.cpp: fixed not all enum fields being used in m_Dimension switch (diff) | |
download | cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.gz cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.bz2 cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.lz cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.xz cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.zst cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.zip |
Diffstat (limited to 'src/Mobs')
-rw-r--r-- | src/Mobs/Monster.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index e6c82a448..8d612fbaa 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -414,11 +414,7 @@ void cMonster::HandleFalling() int cMonster::FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ) { int PosY = POSY_TOINT; - - if (PosY < 0) - PosY = 0; - else if (PosY > cChunkDef::Height) - PosY = cChunkDef::Height; + PosY = Clamp(PosY, 0, cChunkDef::Height); if (!cBlockInfo::IsSolid(m_World->GetBlock((int)floor(a_PosX), PosY, (int)floor(a_PosZ)))) { |