summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-17 19:50:25 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-04-17 19:50:25 +0200
commitbdea8706d8050ba3ea00b580bba795bc468cfdbd (patch)
tree27ec86d16edadcb0811d609c22b3d6e9168491e8 /src/Mobs/Monster.h
parentAdded Prefab initializers to SELFTEST code. (diff)
downloadcuberite-bdea8706d8050ba3ea00b580bba795bc468cfdbd.tar
cuberite-bdea8706d8050ba3ea00b580bba795bc468cfdbd.tar.gz
cuberite-bdea8706d8050ba3ea00b580bba795bc468cfdbd.tar.bz2
cuberite-bdea8706d8050ba3ea00b580bba795bc468cfdbd.tar.lz
cuberite-bdea8706d8050ba3ea00b580bba795bc468cfdbd.tar.xz
cuberite-bdea8706d8050ba3ea00b580bba795bc468cfdbd.tar.zst
cuberite-bdea8706d8050ba3ea00b580bba795bc468cfdbd.zip
Diffstat (limited to 'src/Mobs/Monster.h')
-rw-r--r--src/Mobs/Monster.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h
index 776426a0d..70b3783fc 100644
--- a/src/Mobs/Monster.h
+++ b/src/Mobs/Monster.h
@@ -185,14 +185,14 @@ protected:
inline bool IsNextYPosReachable(int a_PosY)
{
return (
- (a_PosY <= (int)floor(GetPosY())) ||
+ (a_PosY <= POSY_TOINT) ||
DoesPosYRequireJump(a_PosY)
);
}
/** Returns if a monster can reach a given height by jumping */
inline bool DoesPosYRequireJump(int a_PosY)
{
- return ((a_PosY > (int)floor(GetPosY())) && (a_PosY == (int)floor(GetPosY()) + 1));
+ return ((a_PosY > POSY_TOINT) && (a_PosY == POSY_TOINT + 1));
}
/** A semi-temporary list to store the traversed coordinates during active pathfinding so we don't visit them again */