Merge pull request #1636

0.6.3
scrawl 7 years ago
commit ff7f964643
No known key found for this signature in database
GPG Key ID: 2E6CC3676024C402

@ -189,7 +189,7 @@ void MWMechanics::AiPackage::evadeObstacles(const MWWorld::Ptr& actor, float dur
static float distance = MWBase::Environment::get().getWorld()->getMaxActivationDistance(); static float distance = MWBase::Environment::get().getWorld()->getMaxActivationDistance();
MWWorld::Ptr door = getNearbyDoor(actor, distance); 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 // note: AiWander currently does not open doors
if (getTypeId() != TypeIdWander && !door.getCellRef().getTeleport() && door.getClass().getDoorState(door) == 0) 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); MWBase::Environment::get().getWorld()->activate(door, actor);
} }
} }
else // any other obstacle (NPC, crate, etc.) else
{ {
mObstacleCheck.takeEvasiveAction(movement); mObstacleCheck.takeEvasiveAction(movement);
} }

Loading…
Cancel
Save