diff options
author | Mattes D <github@xoft.cz> | 2014-11-24 21:56:25 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-11-24 21:56:25 +0100 |
commit | 9f4562289e4e0dfddd590f39e9f008ed8bf6da4d (patch) | |
tree | 758fac8b34ebf688986f1000cfa15a79bbebedab /src/Mobs/Monster.h | |
parent | Merge pull request #1611 from mc-server/SpawnPrepare (diff) | |
parent | Added TwoHeights shape generator. (diff) | |
download | cuberite-9f4562289e4e0dfddd590f39e9f008ed8bf6da4d.tar cuberite-9f4562289e4e0dfddd590f39e9f008ed8bf6da4d.tar.gz cuberite-9f4562289e4e0dfddd590f39e9f008ed8bf6da4d.tar.bz2 cuberite-9f4562289e4e0dfddd590f39e9f008ed8bf6da4d.tar.lz cuberite-9f4562289e4e0dfddd590f39e9f008ed8bf6da4d.tar.xz cuberite-9f4562289e4e0dfddd590f39e9f008ed8bf6da4d.tar.zst cuberite-9f4562289e4e0dfddd590f39e9f008ed8bf6da4d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Monster.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h index f5ae2cb4d..e5dcb0309 100644 --- a/src/Mobs/Monster.h +++ b/src/Mobs/Monster.h @@ -169,10 +169,12 @@ protected: /** Stores if mobile is currently moving towards the ultimate, final destination */ bool m_bMovingToDestination; - /** Finds the first non-air block position (not the highest, as cWorld::GetHeight does) - If current Y is nonsolid, goes down to try to find a solid block, then returns that + 1 - If current Y is solid, goes up to find first nonsolid block, and returns that */ + /** Finds the lowest non-air block position (not the highest, as cWorld::GetHeight does) + If current Y is nonsolid, goes down to try to find a solid block, then returns that + 1 + If current Y is solid, goes up to find first nonsolid block, and returns that. + If no suitable position is found, returns cChunkDef::Height. */ int FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ); + /** Returns if a monster can actually reach a given height by jumping or walking */ inline bool IsNextYPosReachable(int a_PosY) { |