mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-15 08:56:35 +00:00
Don't add magic effects to dead actors
This commit is contained in:
parent
2b7f775ffe
commit
49de215112
1 changed files with 10 additions and 7 deletions
|
@ -294,6 +294,8 @@ namespace MWMechanics
|
|||
addToSpells(ptr, spell, context);
|
||||
mQueue.clear();
|
||||
|
||||
if (!creatureStats.isDead())
|
||||
{
|
||||
// Vanilla only does this on cell change I think
|
||||
const auto& spells = creatureStats.getSpells();
|
||||
for (const ESM::Spell* spell : spells)
|
||||
|
@ -304,9 +306,10 @@ namespace MWMechanics
|
|||
initParams(ptr, ActiveSpellParams{ spell, ptr, true }, context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ptr.getClass().hasInventoryStore(ptr)
|
||||
&& !(creatureStats.isDead() && !creatureStats.isDeathAnimationFinished()))
|
||||
&& !(creatureStats.isDead() && creatureStats.isDeathAnimationFinished()))
|
||||
{
|
||||
auto& store = ptr.getClass().getInventoryStore(ptr);
|
||||
if (store.getInvListener() != nullptr)
|
||||
|
|
Loading…
Reference in a new issue