diff options
author | Samuel Barney <samjbarney@gmail.com> | 2014-08-26 01:21:16 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2014-08-26 01:21:16 +0200 |
commit | 89039c789a23a313970c5c87aa5b50e0f40ace0d (patch) | |
tree | e40c6c71038e3df210a06f17f57d251756fdaa5f | |
parent | Got it working, finally (diff) | |
download | cuberite-89039c789a23a313970c5c87aa5b50e0f40ace0d.tar cuberite-89039c789a23a313970c5c87aa5b50e0f40ace0d.tar.gz cuberite-89039c789a23a313970c5c87aa5b50e0f40ace0d.tar.bz2 cuberite-89039c789a23a313970c5c87aa5b50e0f40ace0d.tar.lz cuberite-89039c789a23a313970c5c87aa5b50e0f40ace0d.tar.xz cuberite-89039c789a23a313970c5c87aa5b50e0f40ace0d.tar.zst cuberite-89039c789a23a313970c5c87aa5b50e0f40ace0d.zip |
-rw-r--r-- | src/Mobs/Components/MovementComponent.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Mobs/Components/MovementComponent.h b/src/Mobs/Components/MovementComponent.h index 1c876728c..9103a4842 100644 --- a/src/Mobs/Components/MovementComponent.h +++ b/src/Mobs/Components/MovementComponent.h @@ -13,4 +13,9 @@ public: virtual ~cMovementComponent(){} virtual void Tick(float a_Dt, cChunk & a_Chunk){} + + /** 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 */ + int FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ); }; |