From 8b4530740eeb663a87e5634c114905ae5be03cb7 Mon Sep 17 00:00:00 2001 From: Safwat Halaby Date: Mon, 21 Dec 2015 15:51:12 +0200 Subject: PF - Improved mob jumping --- src/Mobs/Path.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Mobs/Path.h') diff --git a/src/Mobs/Path.h b/src/Mobs/Path.h index 158853a8c..ac71968bd 100644 --- a/src/Mobs/Path.h +++ b/src/Mobs/Path.h @@ -79,7 +79,7 @@ public: /** delete default constructors */ cPath(const cPath & a_other) = delete; cPath(cPath && a_other) = delete; - + cPath & operator=(const cPath & a_other) = delete; cPath & operator=(cPath && a_other) = delete; @@ -152,7 +152,7 @@ private: /* Openlist and closedlist management */ void OpenListAdd(cPathCell * a_Cell); cPathCell * OpenListPop(); - void ProcessIfWalkable(const Vector3i &a_Location, cPathCell * a_Parent, int a_Cost); + bool ProcessIfWalkable(const Vector3i &a_Location, cPathCell * a_Parent, int a_Cost); /* Map management */ void ProcessCell(cPathCell * a_Cell, cPathCell * a_Caller, int a_GDelta); @@ -181,6 +181,11 @@ private: /* Interfacing with the world */ cChunk * m_Chunk; // Only valid inside Step()! bool m_BadChunkFound; + + /* High level world queries */ + bool IsWalkable(const Vector3i & a_Location); + bool BodyFitsIn(const Vector3i & a_Location); + bool HasSolidBelow(const Vector3i & a_Location); #ifdef COMPILING_PATHFIND_DEBUGGER #include "../path_irrlicht.cpp" #endif -- cgit v1.2.3