1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

Don't report crime if we are in combat with the victim

This commit is contained in:
scrawl 2014-08-03 00:30:08 +02:00
parent 216ebac2e9
commit 2d74388a76

View file

@ -973,6 +973,9 @@ namespace MWMechanics
if (!it->getClass().isNpc()) if (!it->getClass().isNpc())
continue; continue;
if (it->getClass().getCreatureStats(*it).getAiSequence().isInCombat(victim))
continue;
// Will the witness report the crime? // Will the witness report the crime?
if (it->getClass().getCreatureStats(*it).getAiSetting(CreatureStats::AI_Alarm).getBase() >= alarm) if (it->getClass().getCreatureStats(*it).getAiSetting(CreatureStats::AI_Alarm).getBase() >= alarm)
{ {
@ -1071,6 +1074,9 @@ namespace MWMechanics
if (*it != victim && type == OT_Assault) if (*it != victim && type == OT_Assault)
aggression = iFightAttacking; aggression = iFightAttacking;
if (it->getClass().getCreatureStats(*it).getAiSequence().isInCombat(victim))
continue;
if (it->getClass().isClass(*it, "guard")) if (it->getClass().isClass(*it, "guard"))
{ {
// Mark as Alarmed for dialogue // Mark as Alarmed for dialogue