diff options
author | tycho <work.tycho@gmail.com> | 2015-05-24 18:27:05 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-24 18:27:05 +0200 |
commit | a6ccee594822bc2da5fcf1df9159d54b4040c155 (patch) | |
tree | 232b6454e74d8730853a7e29ac3d535dddc4ddaa /src/Mobs/Monster.cpp | |
parent | Fix other clang 3.6 commit (diff) | |
parent | Merge pull request #2114 from cengizIO/master (diff) | |
download | cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.gz cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.bz2 cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.lz cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.xz cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.tar.zst cuberite-a6ccee594822bc2da5fcf1df9159d54b4040c155.zip |
Diffstat (limited to 'src/Mobs/Monster.cpp')
-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 153baf7ea..e2906efa6 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. } } |