mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 08:35:52 -04:00
[Client] Don't clear placeholder summons in CastSpell::inflict()
This commit is contained in:
parent
1d09763bad
commit
6160293e86
@ -624,8 +624,21 @@ namespace MWMechanics
|
|||||||
std::map<CreatureStats::SummonKey, int>::iterator findCreature = targetStats.getSummonedCreatureMap().find(std::make_pair(effectIt->mEffectID, mId));
|
std::map<CreatureStats::SummonKey, int>::iterator findCreature = targetStats.getSummonedCreatureMap().find(std::make_pair(effectIt->mEffectID, mId));
|
||||||
if (findCreature != targetStats.getSummonedCreatureMap().end())
|
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)
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user