1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 09:53:52 +00:00
This commit is contained in:
gus 2013-10-07 20:30:12 +02:00
parent 1ac3d99c78
commit 94069e3a7e

View file

@ -23,7 +23,7 @@ void MWMechanics::AiSequence::copy (const AiSequence& sequence)
iter!=sequence.mPackages.end(); ++iter)
mPackages.push_back ((*iter)->clone());
mCombat = sequence.mCombat;
mCombatPackage = sequence.mCombatPackage;
mCombatPackage = sequence.mCombatPackage->clone();
}
MWMechanics::AiSequence::AiSequence() : mDone (false), mCombat (false), mCombatPackage (0) {}
@ -93,7 +93,11 @@ void MWMechanics::AiSequence::clear()
for (std::list<AiPackage *>::const_iterator iter (mPackages.begin()); iter!=mPackages.end(); ++iter)
delete *iter;
if(mCombatPackage) delete mCombatPackage;
if(mCombatPackage)
{
delete mCombatPackage;
mCombatPackage = 0;
}
mPackages.clear();
}