mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Merge remote-tracking branch 'scrawl/aiwanderfix'
This commit is contained in:
commit
13112c6d04
@ -651,6 +651,9 @@ namespace MWMechanics
|
||||
if (mAllowedNodes.empty())
|
||||
return;
|
||||
|
||||
if (actor.getClass().isPureWaterCreature(actor))
|
||||
return;
|
||||
|
||||
state.moveIn(new AiWanderStorage());
|
||||
|
||||
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),
|
||||
static_cast<float>(dest.mY), static_cast<float>(dest.mZ));
|
||||
actor.getClass().adjustPosition(actor, false);
|
||||
|
||||
// may have changed cell
|
||||
mStoredAvailableNodes = false;
|
||||
}
|
||||
|
||||
void AiWander::getAllowedNodes(const MWWorld::Ptr& actor, const ESM::Cell* cell)
|
||||
|
Loading…
x
Reference in New Issue
Block a user