mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
Fix priority bug in AiSequence::stack (Fixes #1959)
This commit is contained in:
parent
c826de49a5
commit
ee8b85aa2c
1 changed files with 2 additions and 3 deletions
|
@ -260,15 +260,14 @@ void AiSequence::stack (const AiPackage& package, const MWWorld::Ptr& actor)
|
|||
|
||||
for(std::list<AiPackage *>::iterator it = mPackages.begin(); it != mPackages.end(); ++it)
|
||||
{
|
||||
if(mPackages.front()->getPriority() <= package.getPriority())
|
||||
if((*it)->getPriority() <= package.getPriority())
|
||||
{
|
||||
mPackages.insert(it,package.clone());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(mPackages.empty())
|
||||
mPackages.push_front (package.clone());
|
||||
mPackages.push_front (package.clone());
|
||||
}
|
||||
|
||||
AiPackage* MWMechanics::AiSequence::getActivePackage()
|
||||
|
|
Loading…
Reference in a new issue