1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 22:45:34 +00:00

Merge branch '5055fix' into 'master'

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

See merge request OpenMW/openmw!136
This commit is contained in:
Alexei Dobrohotov 2019-08-01 10:02:36 +00:00
commit 1fdc5151ca
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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))