From baf3a0780489590d9433d115ee51c02a2ecf3e57 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 11 Jul 2015 20:40:03 +0100 Subject: Fixed a position bug in the pathfinder --- src/Mobs/Monster.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/Mobs/Monster.h') diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h index 5438bb7d9..f9b271bf9 100644 --- a/src/Mobs/Monster.h +++ b/src/Mobs/Monster.h @@ -173,9 +173,11 @@ protected: /** Stores if mobile is currently moving towards the ultimate, final destination */ bool m_IsFollowingPath; + /** Stores if pathfinder is being used - set when final destination is set, and unset when stopped moving to final destination */ + bool m_PathfinderActivated; + /* If 0, will give up reaching the next m_NextWayPointPosition and will re-compute path. */ int m_GiveUpCounter; - int m_TicksSinceLastPathReset; /** Coordinates of the next position that should be reached */ Vector3d m_NextWayPointPosition; @@ -183,16 +185,6 @@ protected: /** Coordinates for the ultimate, final destination. */ Vector3d m_FinalDestination; - /** Coordinates for the ultimate, final destination last given to the pathfinder. */ - Vector3d m_PathFinderDestination; - - /** True if there's no path to target and we're walking to an approximated location. */ - bool m_NoPathToTarget; - - /** Whether The mob has finished their path, note that this does not imply reaching the destination, - the destination may sometimes differ from the current path. */ - bool m_NoMoreWayPoints; - /** Finds the lowest 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. -- cgit v1.2.3