diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-31 12:53:10 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-08-31 12:53:10 +0200 |
commit | 0b288fefcccc8c228044ae8319f053f5408264a1 (patch) | |
tree | e0d1bf0accec2149d5c1ece32a7b26adbdb7ac58 /src/Mobs/Monster.cpp | |
parent | Removed BehaviorStriker, and some doc (diff) | |
download | cuberite-0b288fefcccc8c228044ae8319f053f5408264a1.tar cuberite-0b288fefcccc8c228044ae8319f053f5408264a1.tar.gz cuberite-0b288fefcccc8c228044ae8319f053f5408264a1.tar.bz2 cuberite-0b288fefcccc8c228044ae8319f053f5408264a1.tar.lz cuberite-0b288fefcccc8c228044ae8319f053f5408264a1.tar.xz cuberite-0b288fefcccc8c228044ae8319f053f5408264a1.tar.zst cuberite-0b288fefcccc8c228044ae8319f053f5408264a1.zip |
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r-- | src/Mobs/Monster.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index fc1c1678d..51bc0637b 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -433,7 +433,7 @@ void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { // mobToDo fix dont care // Note that m_NextWayPointPosition is actually returned by GetNextWayPoint) - switch (m_PathFinder.GetNextWayPoint(*Chunk, GetPosition(), &m_FinalDestination, &m_NextWayPointPosition, true)) + switch (m_PathFinder.GetNextWayPoint(*Chunk, GetPosition(), &m_FinalDestination, &m_NextWayPointPosition)) { case ePathFinderStatus::PATH_FOUND: { @@ -468,7 +468,8 @@ void cMonster::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) } default: { - + // NEARBY_FOUND is handled internally by cPathFinder. + // Do nothing if CALCULATING. } } } @@ -1378,6 +1379,15 @@ void cMonster::UnpinBehavior(cBehavior * a_Behavior) +cPathFinder & cMonster::GetPathFinder() +{ + return m_PathFinder; +} + + + + + cMonster::eFamily cMonster::GetMobFamily(void) const { return FamilyFromType(m_MobType); |