summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-07-19 10:40:29 +0200
committerarchshift <admin@archshift.com>2014-07-19 10:40:29 +0200
commit041bfd5860cd8ef51db42eb6fb4b50b45549feba (patch)
tree2d93a68b888a5e2b410ec95d124edaad6f67bb92 /src/Mobs
parentRenamed AllToLua_lua script. (diff)
downloadcuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar
cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.gz
cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.bz2
cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.lz
cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.xz
cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.tar.zst
cuberite-041bfd5860cd8ef51db42eb6fb4b50b45549feba.zip
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/Monster.cpp6
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))))
{