summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-27 00:13:13 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-08-27 00:13:13 +0200
commit3b8dc45dc3418359b05ec54b90c94aa2b94405c8 (patch)
treee2e4cb1200d8da5ada4f4d60a7703971ae81c7d3 /src/Mobs/Monster.h
parentSmall fix for cEvent (diff)
parentFixed a position bug in the pathfinder (diff)
downloadcuberite-3b8dc45dc3418359b05ec54b90c94aa2b94405c8.tar
cuberite-3b8dc45dc3418359b05ec54b90c94aa2b94405c8.tar.gz
cuberite-3b8dc45dc3418359b05ec54b90c94aa2b94405c8.tar.bz2
cuberite-3b8dc45dc3418359b05ec54b90c94aa2b94405c8.tar.lz
cuberite-3b8dc45dc3418359b05ec54b90c94aa2b94405c8.tar.xz
cuberite-3b8dc45dc3418359b05ec54b90c94aa2b94405c8.tar.zst
cuberite-3b8dc45dc3418359b05ec54b90c94aa2b94405c8.zip
Diffstat (limited to 'src/Mobs/Monster.h')
-rw-r--r--src/Mobs/Monster.h14
1 files changed, 3 insertions, 11 deletions
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.