diff options
author | worktycho <work.tycho@gmail.com> | 2015-05-24 13:51:15 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2015-05-24 13:51:15 +0200 |
commit | d86e8fae79a1f1777b2befcefb671f8af29c6d04 (patch) | |
tree | 81e1d64688def74a1a9f518e660a0db452b2b5a3 /src/Mobs/Monster.cpp | |
parent | Update CONTRIBUTORS (diff) | |
parent | Pathfinder - Bounding boxes and some tweaks (diff) | |
download | cuberite-d86e8fae79a1f1777b2befcefb671f8af29c6d04.tar cuberite-d86e8fae79a1f1777b2befcefb671f8af29c6d04.tar.gz cuberite-d86e8fae79a1f1777b2befcefb671f8af29c6d04.tar.bz2 cuberite-d86e8fae79a1f1777b2befcefb671f8af29c6d04.tar.lz cuberite-d86e8fae79a1f1777b2befcefb671f8af29c6d04.tar.xz cuberite-d86e8fae79a1f1777b2befcefb671f8af29c6d04.tar.zst cuberite-d86e8fae79a1f1777b2befcefb671f8af29c6d04.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Monster.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index f5d961096..1da4124ed 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -169,7 +169,7 @@ bool cMonster::TickPathFinding(cChunk & a_Chunk) m_NoPathToTarget = false; m_NoMoreWayPoints = false; m_PathFinderDestination = m_FinalDestination; - m_Path = new cPath(a_Chunk, GetPosition().Floor(), m_PathFinderDestination.Floor(), 20); + m_Path = new cPath(a_Chunk, GetPosition(), m_PathFinderDestination, 20, GetWidth(), GetHeight()); } switch (m_Path->Step(a_Chunk)) @@ -183,7 +183,7 @@ bool cMonster::TickPathFinding(cChunk & a_Chunk) case ePathFinderStatus::PATH_NOT_FOUND: { - ResetPathFinding(); // Try to calculate a path again. + StopMovingToPosition(); // Try to calculate a path again. // Note that the next time may succeed, e.g. if a player breaks a barrier. break; } @@ -203,7 +203,7 @@ bool cMonster::TickPathFinding(cChunk & a_Chunk) { if ((m_Path->IsFirstPoint() || ReachedNextWaypoint())) { - m_NextWayPointPosition = Vector3d(0.5, 0, 0.5) + m_Path->GetNextPoint(); + m_NextWayPointPosition = m_Path->GetNextPoint(); m_GiveUpCounter = 40; // Give up after 40 ticks (2 seconds) if failed to reach m_NextWayPointPosition. } } |