mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
[Client] Don't clear placeholder summons in CastSpell::inflict()
This commit is contained in:
parent
1d09763bad
commit
6160293e86
1 changed files with 15 additions and 2 deletions
|
@ -623,10 +623,23 @@ namespace MWMechanics
|
|||
CreatureStats& targetStats = target.getClass().getCreatureStats(target);
|
||||
std::map<CreatureStats::SummonKey, int>::iterator findCreature = targetStats.getSummonedCreatureMap().find(std::make_pair(effectIt->mEffectID, mId));
|
||||
if (findCreature != targetStats.getSummonedCreatureMap().end())
|
||||
{
|
||||
/*
|
||||
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)
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
if (target.getClass().isActor() || magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration)
|
||||
|
|
Loading…
Reference in a new issue