mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 23:45:32 +00:00
Allow getting current active package
This commit is contained in:
parent
7e96a391da
commit
2446abe076
2 changed files with 11 additions and 0 deletions
|
@ -102,6 +102,14 @@ void MWMechanics::AiSequence::queue (const AiPackage& package)
|
|||
mPackages.push_back (package.clone());
|
||||
}
|
||||
|
||||
MWMechanics::AiPackage* MWMechanics::AiSequence::getActivePackage()
|
||||
{
|
||||
if(mPackages.empty())
|
||||
throw std::runtime_error(std::string("No AI Package!"));
|
||||
else
|
||||
return mPackages.front();
|
||||
}
|
||||
|
||||
void MWMechanics::AiSequence::fill(const ESM::AIPackageList &list)
|
||||
{
|
||||
for (std::vector<ESM::AIPackage>::const_iterator it = list.mList.begin(); it != list.mList.end(); ++it)
|
||||
|
|
|
@ -52,6 +52,9 @@ namespace MWMechanics
|
|||
///< Add \a package to the end of the sequence (executed after all other packages have been
|
||||
/// completed)
|
||||
|
||||
AiPackage* getActivePackage();
|
||||
///< return the current active package. If there is no active package, throw an exeption
|
||||
|
||||
void fill (const ESM::AIPackageList& list);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue