Fix Non-swimming enemies entering water if player is water walking (bug #5099)

pull/2468/head
Artem Nykolenko 5 years ago committed by Alexei Dobrohotov
parent 264a769827
commit 610e87cb24

@ -114,6 +114,7 @@
Bug #5082: Scrolling with controller in GUI mode is broken
Bug #5092: NPCs with enchanted weapons play sound when out of charges
Bug #5093: Hand to hand sound plays on knocked out enemies
Bug #5099: Non-swimming enemies will enter water if player is water walking
Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls

@ -422,6 +422,11 @@ namespace MWMechanics
return true;
}
if (actor.getClass().isPureLandCreature(actor) && MWBase::Environment::get().getWorld()->isWalkingOnWater(enemy))
{
return false;
}
if (actor.getClass().isPureFlyingCreature(actor) || actor.getClass().isPureLandCreature(actor))
{
if (MWBase::Environment::get().getWorld()->isSwimming(enemy))

Loading…
Cancel
Save