|
|
|
@ -675,6 +675,8 @@ namespace MWClass
|
|
|
|
|
|
|
|
|
|
// NOTE: 'object' and/or 'attacker' may be empty.
|
|
|
|
|
|
|
|
|
|
if (ptr != MWBase::Environment::get().getWorld()->getPlayerPtr())
|
|
|
|
|
{
|
|
|
|
|
// Attacking peaceful NPCs is a crime
|
|
|
|
|
if (!attacker.isEmpty() && !ptr.getClass().getCreatureStats(ptr).isHostile() &&
|
|
|
|
|
!MWBase::Environment::get().getMechanicsManager()->isAggressive(ptr, attacker))
|
|
|
|
@ -687,6 +689,7 @@ namespace MWClass
|
|
|
|
|
// Note: accidental or collateral damage attacks are ignored.
|
|
|
|
|
MWBase::Environment::get().getMechanicsManager()->startCombat(ptr, attacker);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool wasDead = getCreatureStats(ptr).isDead();
|
|
|
|
|
|
|
|
|
|