1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 10:09:39 +00:00

Don't set Attacked flag when the actor is already in combat with the attacker (Fixes #1909)

This commit is contained in:
scrawl 2014-09-14 10:35:57 +02:00
parent c5fa0768f1
commit 1270dada34
2 changed files with 6 additions and 3 deletions

View file

@ -329,6 +329,7 @@ namespace MWClass
{
// NOTE: 'object' and/or 'attacker' may be empty.
if (!attacker.isEmpty() && !ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat(attacker))
getCreatureStats(ptr).setAttacked(true);
// Self defense

View file

@ -640,10 +640,12 @@ namespace MWClass
bool wasDead = getCreatureStats(ptr).isDead();
if (!attacker.isEmpty() && !ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat(attacker))
{
getCreatureStats(ptr).setAttacked(true);
if (!attacker.isEmpty())
MWBase::Environment::get().getMechanicsManager()->actorAttacked(ptr, attacker);
}
if(!successful)
{