1
0
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:
elsid 2019-08-25 13:49:04 +02:00
parent 389f5dfb9b
commit 97cd9d434a
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -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();