1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-13 18:09:39 +00:00
This commit is contained in:
gus 2014-02-17 15:49:49 +01:00
parent 84959eea28
commit d8f24ac499
2 changed files with 6 additions and 2 deletions

View file

@ -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();
bool cellChange = cell->mData.mX != mCellX || cell->mData.mY != mCellY;

View file

@ -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)
{
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;
mStuckTimer = mStuckTimer + duration;