mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 03:54:40 +00:00
Add missing AiFollow ActorId initialization (Fixes #1818)
This commit is contained in:
parent
bcc79919a7
commit
9b38888ac9
@ -32,6 +32,15 @@ MWMechanics::AiFollow::AiFollow(const std::string &actorId, bool commanded)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MWMechanics::AiFollow::AiFollow(const ESM::AiSequence::AiFollow *follow)
|
||||||
|
: mAlwaysFollow(follow->mAlwaysFollow), mRemainingDuration(follow->mRemainingDuration)
|
||||||
|
, mX(follow->mData.mX), mY(follow->mData.mY), mZ(follow->mData.mZ)
|
||||||
|
, mActorRefId(follow->mTargetId), mActorId(-1), mCellId(follow->mCellId)
|
||||||
|
, mCommanded(follow->mCommanded)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool MWMechanics::AiFollow::execute (const MWWorld::Ptr& actor,float duration)
|
bool MWMechanics::AiFollow::execute (const MWWorld::Ptr& actor,float duration)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr target = getTarget();
|
MWWorld::Ptr target = getTarget();
|
||||||
@ -131,15 +140,6 @@ void MWMechanics::AiFollow::writeState(ESM::AiSequence::AiSequence &sequence) co
|
|||||||
sequence.mPackages.push_back(package);
|
sequence.mPackages.push_back(package);
|
||||||
}
|
}
|
||||||
|
|
||||||
MWMechanics::AiFollow::AiFollow(const ESM::AiSequence::AiFollow *follow)
|
|
||||||
: mAlwaysFollow(follow->mAlwaysFollow), mRemainingDuration(follow->mRemainingDuration)
|
|
||||||
, mX(follow->mData.mX), mY(follow->mData.mY), mZ(follow->mData.mZ)
|
|
||||||
, mActorRefId(follow->mTargetId), mCellId(follow->mCellId)
|
|
||||||
, mCommanded(follow->mCommanded)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MWWorld::Ptr MWMechanics::AiFollow::getTarget()
|
MWWorld::Ptr MWMechanics::AiFollow::getTarget()
|
||||||
{
|
{
|
||||||
if (mActorId == -2)
|
if (mActorId == -2)
|
||||||
|
Loading…
Reference in New Issue
Block a user