mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 17:36:42 +00:00
Fix issue when killed NPC cannot be looted if it was in combat mode before killing.
This commit is contained in:
parent
1f74d8cca5
commit
80c92789c2
1 changed files with 7 additions and 2 deletions
|
@ -516,8 +516,13 @@ void OMW::Engine::activate()
|
||||||
if (ptr.getClass().getName(ptr) == "") // objects without name presented to user can never be activated
|
if (ptr.getClass().getName(ptr) == "") // objects without name presented to user can never be activated
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ptr.getClass().isActor() && ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
|
if (ptr.getClass().isActor())
|
||||||
|
{
|
||||||
|
MWMechanics::CreatureStats &stats = ptr.getClass().getCreatureStats(ptr);
|
||||||
|
|
||||||
|
if (stats.getAiSequence().isInCombat() && !stats.isDead())
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld()->activate(ptr, MWBase::Environment::get().getWorld()->getPlayerPtr());
|
MWBase::Environment::get().getWorld()->activate(ptr, MWBase::Environment::get().getWorld()->getPlayerPtr());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue