forked from teamnwah/openmw-tes3coop
Fix never clearing graveyard. Oops
This commit is contained in:
parent
6de7e16550
commit
b16d444f0f
1 changed files with 6 additions and 1 deletions
|
@ -574,12 +574,17 @@ namespace MWMechanics
|
|||
}
|
||||
}
|
||||
|
||||
for (std::vector<int>::iterator it = creatureStats.mSummonGraveyard.begin(); it != creatureStats.mSummonGraveyard.end(); ++it)
|
||||
for (std::vector<int>::iterator it = creatureStats.mSummonGraveyard.begin(); it != creatureStats.mSummonGraveyard.end(); )
|
||||
{
|
||||
MWWorld::Ptr ptr = MWBase::Environment::get().getWorld()->searchPtrViaActorId(*it);
|
||||
if (!ptr.isEmpty())
|
||||
{
|
||||
it = creatureStats.mSummonGraveyard.erase(it);
|
||||
MWBase::Environment::get().getWorld()->deleteObject(ptr);
|
||||
}
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
void Actors::calculateNpcStatModifiers (const MWWorld::Ptr& ptr)
|
||||
|
|
Loading…
Reference in a new issue