From 89039c789a23a313970c5c87aa5b50e0f40ace0d Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Mon, 25 Aug 2014 17:21:16 -0600 Subject: Added some functionality to the Movement Component --- src/Mobs/Components/MovementComponent.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Mobs') 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); }; -- cgit v1.2.3