mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-13 16:18:52 +00:00
Do not cancel Ai packages when on loading (Fixes #3409)
This piece of code was an attempt to fix up save games made before commit d3b76b70063da765b107a766142a681bd7ad5f73 , but ended up introducing a new bug.
This commit is contained in:
parent
d487007167
commit
496cb85b01
@ -409,21 +409,6 @@ void AiSequence::readState(const ESM::AiSequence::AiSequence &sequence)
|
|||||||
if (!package.get())
|
if (!package.get())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// remove previous packages if required
|
|
||||||
if (package->shouldCancelPreviousAi())
|
|
||||||
{
|
|
||||||
for(std::list<AiPackage *>::iterator it = mPackages.begin(); it != mPackages.end();)
|
|
||||||
{
|
|
||||||
if((*it)->canCancel())
|
|
||||||
{
|
|
||||||
delete *it;
|
|
||||||
it = mPackages.erase(it);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mPackages.push_back(package.release());
|
mPackages.push_back(package.release());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user