mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-18 00:45:39 -04:00
Merge branch 'necromanticnightmare' into 'master'
Don't add magic effects to dead actors Closes #8680 See merge request OpenMW/openmw!4882
This commit is contained in:
commit
0c95d62e89
@ -294,19 +294,22 @@ namespace MWMechanics
|
|||||||
addToSpells(ptr, spell, context);
|
addToSpells(ptr, spell, context);
|
||||||
mQueue.clear();
|
mQueue.clear();
|
||||||
|
|
||||||
// Vanilla only does this on cell change I think
|
if (!creatureStats.isDead())
|
||||||
const auto& spells = creatureStats.getSpells();
|
|
||||||
for (const ESM::Spell* spell : spells)
|
|
||||||
{
|
{
|
||||||
if (spell->mData.mType != ESM::Spell::ST_Spell && spell->mData.mType != ESM::Spell::ST_Power
|
// Vanilla only does this on cell change I think
|
||||||
&& !isSpellActive(spell->mId))
|
const auto& spells = creatureStats.getSpells();
|
||||||
|
for (const ESM::Spell* spell : spells)
|
||||||
{
|
{
|
||||||
initParams(ptr, ActiveSpellParams{ spell, ptr, true }, context);
|
if (spell->mData.mType != ESM::Spell::ST_Spell && spell->mData.mType != ESM::Spell::ST_Power
|
||||||
|
&& !isSpellActive(spell->mId))
|
||||||
|
{
|
||||||
|
initParams(ptr, ActiveSpellParams{ spell, ptr, true }, context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ptr.getClass().hasInventoryStore(ptr)
|
if (ptr.getClass().hasInventoryStore(ptr)
|
||||||
&& !(creatureStats.isDead() && !creatureStats.isDeathAnimationFinished()))
|
&& !(creatureStats.isDead() && creatureStats.isDeathAnimationFinished()))
|
||||||
{
|
{
|
||||||
auto& store = ptr.getClass().getInventoryStore(ptr);
|
auto& store = ptr.getClass().getInventoryStore(ptr);
|
||||||
if (store.getInvListener() != nullptr)
|
if (store.getInvListener() != nullptr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user