1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:23:51 +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 d4b7b3e999
commit 653a391084
No known key found for this signature in database
GPG key ID: D27B8E8D10A2896B

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