mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 12:40:04 +00:00
Allow getting current active package
This commit is contained in:
parent
7e96a391da
commit
2446abe076
@ -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…
x
Reference in New Issue
Block a user