1
0
Fork 1
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:
Andrei Kortunov 2019-10-11 20:06:16 +04:00 committed by GitHub
commit 67bef9a3a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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