mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 08:39:41 +00:00
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
|
// Make guards fight aggressive creatures
|
||||||
if (!actor1.getClass().isNpc() && actor2.getClass().isClass(actor2, "Guard"))
|
if (!actor1.getClass().isNpc() && actor2.getClass().isClass(actor2, "Guard"))
|
||||||
{
|
{
|
||||||
// if creature is hostile then it is necessarily to start combat
|
if (creatureStats.getAiSequence().isInCombat() && MWBase::Environment::get().getMechanicsManager()->isAggressive(actor1, actor2))
|
||||||
if (creatureStats.getAiSequence().isInCombat()) aggressive = true;
|
aggressive = true;
|
||||||
else aggressive = MWBase::Environment::get().getMechanicsManager()->isAggressive(actor1, actor2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue