mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 03:40:40 +00:00
Do not open doors when actor has no path
When actor is not going anywhere it doesn't require to go through doors so there is no need to open them.
This commit is contained in:
parent
389f5dfb9b
commit
97cd9d434a
@ -228,6 +228,9 @@ void MWMechanics::AiPackage::openDoors(const MWWorld::Ptr& actor)
|
||||
if (getTypeId() == TypeIdWander)
|
||||
return;
|
||||
|
||||
if (mPathFinder.getPathSize() == 0)
|
||||
return;
|
||||
|
||||
MWBase::World* world = MWBase::Environment::get().getWorld();
|
||||
static float distance = world->getMaxActivationDistance();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user