forked from mirror/openmw-tes3mp
Don't make guards fight non-aggressive creatures that are in combat
Ex. summoned creature that is helping in a fight.
This commit is contained in:
parent
d9a6515fe3
commit
d956df83e4
1 changed files with 2 additions and 3 deletions
|
@ -220,9 +220,8 @@ namespace MWMechanics
|
|||
// Make guards fight aggressive creatures
|
||||
if (!actor1.getClass().isNpc() && actor2.getClass().isClass(actor2, "Guard"))
|
||||
{
|
||||
// if creature is hostile then it is necessarily to start combat
|
||||
if (creatureStats.getAiSequence().isInCombat()) aggressive = true;
|
||||
else aggressive = MWBase::Environment::get().getMechanicsManager()->isAggressive(actor1, actor2);
|
||||
if (creatureStats.getAiSequence().isInCombat() && MWBase::Environment::get().getMechanicsManager()->isAggressive(actor1, actor2))
|
||||
aggressive = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue