1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 00:35:23 +00:00

Crime fix

This commit is contained in:
scrawl 2015-01-05 19:59:47 +01:00
parent c343a5c803
commit 708dbc2518

View File

@ -1164,6 +1164,19 @@ namespace MWMechanics
player.getClass().getNpcStats(player).expell(factionID);
}
}
if (type == OT_Assault && !victim.isEmpty()
&& !victim.getClass().getCreatureStats(victim).getAiSequence().isInCombat(player)
&& victim.getClass().isNpc())
{
// Attacker is in combat with us, but we are not in combat with the attacker yet. Time to fight back.
// Note: accidental or collateral damage attacks are ignored.
startCombat(victim, player);
// Set the crime ID, which we will use to calm down participants
// once the bounty has been paid.
victim.getClass().getNpcStats(victim).setCrimeId(id);
}
}
}