actorid
gus 11 years ago
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();
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)
{
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;

Loading…
Cancel
Save