1
0

Path recalculation improvements

This commit is contained in:
SafwatHalaby
2015-05-19 06:54:20 +03:00
parent eaedd5f19d
commit 8436e5d8bd
3 changed files with 17 additions and 10 deletions

View File

@@ -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: