1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Fix issue when killed NPC cannot be looted if it was in combat mode before killing.

This commit is contained in:
Nik Dyonin 2014-12-14 02:58:42 +03:00
parent 1f74d8cca5
commit 80c92789c2

View file

@ -516,8 +516,13 @@ void OMW::Engine::activate()
if (ptr.getClass().getName(ptr) == "") // objects without name presented to user can never be activated
return;
if (ptr.getClass().isActor() && ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
return;
if (ptr.getClass().isActor())
{
MWMechanics::CreatureStats &stats = ptr.getClass().getCreatureStats(ptr);
if (stats.getAiSequence().isInCombat() && !stats.isDead())
return;
}
MWBase::Environment::get().getWorld()->activate(ptr, MWBase::Environment::get().getWorld()->getPlayerPtr());
}