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:
parent
e37bcc26ac
commit
e9009f8d10
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue