1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-06 02:15:32 +00:00

[Client] Don't clear placeholder summons in CastSpell::inflict()

This commit is contained in:
David Cernat 2019-08-12 15:12:34 +03:00
parent 1d09763bad
commit 6160293e86

View file

@ -624,8 +624,21 @@ namespace MWMechanics
std::map<CreatureStats::SummonKey, int>::iterator findCreature = targetStats.getSummonedCreatureMap().find(std::make_pair(effectIt->mEffectID, mId));
if (findCreature != targetStats.getSummonedCreatureMap().end())
{
MWBase::Environment::get().getMechanicsManager()->cleanupSummonedCreature(target, findCreature->second);
targetStats.getSummonedCreatureMap().erase(findCreature);
/*
Start of tes3mp change (major)
Don't clean up placeholder summoned creatures still awaiting a spawn
packet from the server, because that would make the packet create permanent
spawns instead
*/
if (findCreature->second != -1)
{
MWBase::Environment::get().getMechanicsManager()->cleanupSummonedCreature(target, findCreature->second);
targetStats.getSummonedCreatureMap().erase(findCreature);
}
/*
End of tes3mp change (major)
*/
}
}