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:
parent
d4b7b3e999
commit
653a391084
1 changed files with 3 additions and 0 deletions
|
@ -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…
Reference in a new issue