|
|
@ -651,6 +651,9 @@ namespace MWMechanics
|
|
|
|
if (mAllowedNodes.empty())
|
|
|
|
if (mAllowedNodes.empty())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (actor.getClass().isPureWaterCreature(actor))
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
state.moveIn(new AiWanderStorage());
|
|
|
|
state.moveIn(new AiWanderStorage());
|
|
|
|
|
|
|
|
|
|
|
|
int index = OEngine::Misc::Rng::rollDice(mAllowedNodes.size());
|
|
|
|
int index = OEngine::Misc::Rng::rollDice(mAllowedNodes.size());
|
|
|
@ -669,6 +672,9 @@ namespace MWMechanics
|
|
|
|
MWBase::Environment::get().getWorld()->moveObject(actor, static_cast<float>(dest.mX),
|
|
|
|
MWBase::Environment::get().getWorld()->moveObject(actor, static_cast<float>(dest.mX),
|
|
|
|
static_cast<float>(dest.mY), static_cast<float>(dest.mZ));
|
|
|
|
static_cast<float>(dest.mY), static_cast<float>(dest.mZ));
|
|
|
|
actor.getClass().adjustPosition(actor, false);
|
|
|
|
actor.getClass().adjustPosition(actor, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// may have changed cell
|
|
|
|
|
|
|
|
mStoredAvailableNodes = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AiWander::getAllowedNodes(const MWWorld::Ptr& actor, const ESM::Cell* cell)
|
|
|
|
void AiWander::getAllowedNodes(const MWWorld::Ptr& actor, const ESM::Cell* cell)
|
|
|
|