summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-23 12:31:03 +0200
committertycho <work.tycho@gmail.com>2015-05-23 12:31:03 +0200
commit1577a080ee4e2fb5baaee8c8c98149eb8418b6c6 (patch)
treef8d9453f07a7475562b68ccfbfa92ad817a206be /src/Mobs/Monster.cpp
parentFix tests (diff)
parentMerge pull request #2108 from mc-server/tgh-boolean (diff)
downloadcuberite-1577a080ee4e2fb5baaee8c8c98149eb8418b6c6.tar
cuberite-1577a080ee4e2fb5baaee8c8c98149eb8418b6c6.tar.gz
cuberite-1577a080ee4e2fb5baaee8c8c98149eb8418b6c6.tar.bz2
cuberite-1577a080ee4e2fb5baaee8c8c98149eb8418b6c6.tar.lz
cuberite-1577a080ee4e2fb5baaee8c8c98149eb8418b6c6.tar.xz
cuberite-1577a080ee4e2fb5baaee8c8c98149eb8418b6c6.tar.zst
cuberite-1577a080ee4e2fb5baaee8c8c98149eb8418b6c6.zip
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r--src/Mobs/Monster.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 619e20855..153baf7ea 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -177,13 +177,14 @@ bool cMonster::TickPathFinding(cChunk & a_Chunk)
case ePathFinderStatus::NEARBY_FOUND:
{
m_NoPathToTarget = true;
- m_Path->AcceptNearbyPath();
+ m_PathFinderDestination = m_Path->AcceptNearbyPath();
break;
}
case ePathFinderStatus::PATH_NOT_FOUND:
{
- StopMovingToPosition(); // Give up pathfinding to that destination.
+ ResetPathFinding(); // Try to calculate a path again.
+ // Note that the next time may succeed, e.g. if a player breaks a barrier.
break;
}
case ePathFinderStatus::CALCULATING: