1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 07:09:42 +00:00

Make sure summoned creatures are removed upon caster death

This commit is contained in:
Capostrophic 2019-10-10 17:18:28 +03:00
parent e37bcc26ac
commit e9009f8d10

View file

@ -86,9 +86,10 @@ namespace MWMechanics
}
// Update summon effects
bool casterDead = creatureStats.isDead();
for (std::map<CreatureStats::SummonKey, int>::iterator it = creatureMap.begin(); it != creatureMap.end(); )
{
bool found = mActiveEffects.find(it->first) != mActiveEffects.end();
bool found = !casterDead && mActiveEffects.find(it->first) != mActiveEffects.end();
if (!found)
{
// Effect has ended