diff options
author | Safwat Halaby <SafwatHalaby@users.noreply.github.com> | 2015-12-22 06:42:28 +0100 |
---|---|---|
committer | Safwat Halaby <SafwatHalaby@users.noreply.github.com> | 2015-12-22 06:42:28 +0100 |
commit | d112632d6a10034fd989e285ce87d6199832d620 (patch) | |
tree | 2df1479569ed70c839d047b8864726c78febe386 /src/Mobs/Path.h | |
parent | Merge pull request #2791 from then0rTh/master (diff) | |
parent | PF - Improved mob jumping (diff) | |
download | cuberite-d112632d6a10034fd989e285ce87d6199832d620.tar cuberite-d112632d6a10034fd989e285ce87d6199832d620.tar.gz cuberite-d112632d6a10034fd989e285ce87d6199832d620.tar.bz2 cuberite-d112632d6a10034fd989e285ce87d6199832d620.tar.lz cuberite-d112632d6a10034fd989e285ce87d6199832d620.tar.xz cuberite-d112632d6a10034fd989e285ce87d6199832d620.tar.zst cuberite-d112632d6a10034fd989e285ce87d6199832d620.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Path.h | 9 |
1 files changed, 7 insertions, 2 deletions
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 |