diff options
author | Safwat Halaby <SafwatHalaby@users.noreply.github.com> | 2015-12-21 14:51:12 +0100 |
---|---|---|
committer | Safwat Halaby <SafwatHalaby@users.noreply.github.com> | 2015-12-21 19:00:25 +0100 |
commit | 8b4530740eeb663a87e5634c114905ae5be03cb7 (patch) | |
tree | 84c4284da19eeda3300853a96c72d785f4c3ab38 /src/Mobs/Path.h | |
parent | Merge pull request #2786 from SafwatHalaby/revert (diff) | |
download | cuberite-8b4530740eeb663a87e5634c114905ae5be03cb7.tar cuberite-8b4530740eeb663a87e5634c114905ae5be03cb7.tar.gz cuberite-8b4530740eeb663a87e5634c114905ae5be03cb7.tar.bz2 cuberite-8b4530740eeb663a87e5634c114905ae5be03cb7.tar.lz cuberite-8b4530740eeb663a87e5634c114905ae5be03cb7.tar.xz cuberite-8b4530740eeb663a87e5634c114905ae5be03cb7.tar.zst cuberite-8b4530740eeb663a87e5634c114905ae5be03cb7.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 |