mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 20:15:33 +00:00
Disallow AiWander fast-forward for water creatures
Pathgrid nodes are usually above the water level, so appearing at a random node would have the creature break out of the water level it's supposed to be constrained to.
This commit is contained in:
parent
98a77f68a3
commit
5347d407d8
1 changed files with 3 additions and 0 deletions
|
@ -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());
|
||||||
|
|
Loading…
Reference in a new issue