mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-13 07:14:31 +00:00
bug fix
This commit is contained in:
parent
84959eea28
commit
d8f24ac499
@ -59,7 +59,9 @@ bool MWMechanics::AiActivate::execute (const MWWorld::Ptr& actor,float duration)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Ptr target = world->getPtr(mObjectId,false);
|
MWWorld::Ptr target = world->searchPtr(mObjectId,false);
|
||||||
|
if(target == MWWorld::Ptr()) return true;
|
||||||
|
|
||||||
ESM::Position targetPos = target.getRefData().getPosition();
|
ESM::Position targetPos = target.getRefData().getPosition();
|
||||||
|
|
||||||
bool cellChange = cell->mData.mX != mCellX || cell->mData.mY != mCellY;
|
bool cellChange = cell->mData.mX != mCellX || cell->mData.mY != mCellY;
|
||||||
|
@ -20,7 +20,9 @@ MWMechanics::AiFollow::AiFollow(const std::string &actorId,const std::string &ce
|
|||||||
|
|
||||||
bool MWMechanics::AiFollow::execute (const MWWorld::Ptr& actor,float duration)
|
bool MWMechanics::AiFollow::execute (const MWWorld::Ptr& actor,float duration)
|
||||||
{
|
{
|
||||||
const MWWorld::Ptr target = MWBase::Environment::get().getWorld()->getPtr(mActorId, false);
|
const MWWorld::Ptr target = MWBase::Environment::get().getWorld()->searchPtr(mActorId, false);
|
||||||
|
|
||||||
|
if(target == MWWorld::Ptr()) return false;
|
||||||
|
|
||||||
mTimer = mTimer + duration;
|
mTimer = mTimer + duration;
|
||||||
mStuckTimer = mStuckTimer + duration;
|
mStuckTimer = mStuckTimer + duration;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user