forked from mirror/openmw-tes3mp
Restrict opening doors to bipedal actors (Fixes #4313)
This commit is contained in:
parent
9b8c56761b
commit
5b49248d6e
1 changed files with 2 additions and 2 deletions
|
@ -189,7 +189,7 @@ void MWMechanics::AiPackage::evadeObstacles(const MWWorld::Ptr& actor, float dur
|
|||
static float distance = MWBase::Environment::get().getWorld()->getMaxActivationDistance();
|
||||
|
||||
MWWorld::Ptr door = getNearbyDoor(actor, distance);
|
||||
if (door != MWWorld::Ptr())
|
||||
if (door != MWWorld::Ptr() && actor.getClass().isBipedal(actor))
|
||||
{
|
||||
// note: AiWander currently does not open doors
|
||||
if (getTypeId() != TypeIdWander && !door.getCellRef().getTeleport() && door.getClass().getDoorState(door) == 0)
|
||||
|
@ -224,7 +224,7 @@ void MWMechanics::AiPackage::evadeObstacles(const MWWorld::Ptr& actor, float dur
|
|||
MWBase::Environment::get().getWorld()->activate(door, actor);
|
||||
}
|
||||
}
|
||||
else // any other obstacle (NPC, crate, etc.)
|
||||
else
|
||||
{
|
||||
mObstacleCheck.takeEvasiveAction(movement);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue