This commit is contained in:
David Markowitz
2023-08-12 00:40:18 -07:00
parent 84ba38bd1d
commit 56ab6bd4c3
3 changed files with 15 additions and 11 deletions

View File

@@ -399,6 +399,9 @@ void MovementAIComponent::SetDestination(const NiPoint3& destination) {
std::vector<NiPoint3> computedPath;
if (dpWorld::Instance().IsLoaded()) {
computedPath = dpWorld::Instance().GetNavMesh()->GetPath(m_Parent->GetPosition(), destination, m_Info.wanderSpeed);
} else {
// If we do not have a navmesh, we do not want an AI to be going towards points that are far below or above the map.
//
}
// Somehow failed