mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 01:19:59 +00:00
Merge pull request #2554 from Capostrophic/summon
Make sure summoned creatures are removed upon caster death (#5183)
This commit is contained in:
commit
67bef9a3a1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user