mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +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
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