mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 00:35:23 +00:00
Crime fix
This commit is contained in:
parent
c343a5c803
commit
708dbc2518
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user