mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-20 15:40:32 +00:00
Allow travelling actors find path over pathgrid navmesh area type
In addition to other navmesh areas. This makes actors behaviour closer to vanilla when pathgrid is correct.
This commit is contained in:
parent
163968f578
commit
9950132a5f
@ -443,7 +443,11 @@ DetourNavigator::Flags MWMechanics::AiPackage::getNavigatorFlags(const MWWorld::
|
||||
result |= DetourNavigator::Flag_swim;
|
||||
|
||||
if (actorClass.canWalk(actor) && actor.getClass().getWalkSpeed(actor) > 0)
|
||||
{
|
||||
result |= DetourNavigator::Flag_walk;
|
||||
if (getTypeId() == AiPackageTypeId::Travel)
|
||||
result |= DetourNavigator::Flag_usePathgrid;
|
||||
}
|
||||
|
||||
if (actorClass.isBipedal(actor) && getTypeId() != AiPackageTypeId::Wander)
|
||||
result |= DetourNavigator::Flag_openDoor;
|
||||
|
@ -397,7 +397,7 @@ namespace MWMechanics
|
||||
mPath.clear();
|
||||
}
|
||||
|
||||
if (status != DetourNavigator::Status::NavMeshNotFound && mPath.empty())
|
||||
if (status != DetourNavigator::Status::NavMeshNotFound && mPath.empty() && (flags & DetourNavigator::Flag_usePathgrid) == 0)
|
||||
{
|
||||
status = buildPathByNavigatorImpl(actor, startPoint, endPoint, halfExtents,
|
||||
flags | DetourNavigator::Flag_usePathgrid, areaCosts, endTolerance, pathType, std::back_inserter(mPath));
|
||||
|
Loading…
x
Reference in New Issue
Block a user