diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 66eabf0fb..7753dc568 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -738,7 +738,7 @@ namespace MWClass { MWBase::World *world = MWBase::Environment::get().getWorld(); Ogre::Vector3 pos(ptr.getRefData().getPosition().pos); - if(world->isUnderwater(ptr.getCell(), pos)) + if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr)) return 2; if(world->isOnGround(ptr)) return 0; @@ -748,7 +748,7 @@ namespace MWClass { MWBase::World *world = MWBase::Environment::get().getWorld(); Ogre::Vector3 pos(ptr.getRefData().getPosition().pos); - if(world->isUnderwater(ptr.getCell(), pos)) + if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr)) return 3; if(world->isOnGround(ptr)) return 1; diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index a29274ca7..4149d31d3 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -1222,7 +1222,7 @@ namespace MWClass Ogre::Vector3 pos(ptr.getRefData().getPosition().pos); if(world->isSwimming(ptr)) return "Swim Left"; - if(world->isUnderwater(ptr.getCell(), pos)) + if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr)) return "FootWaterLeft"; if(world->isOnGround(ptr)) { @@ -1249,7 +1249,7 @@ namespace MWClass Ogre::Vector3 pos(ptr.getRefData().getPosition().pos); if(world->isSwimming(ptr)) return "Swim Right"; - if(world->isUnderwater(ptr.getCell(), pos)) + if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr)) return "FootWaterRight"; if(world->isOnGround(ptr)) { @@ -1274,7 +1274,7 @@ namespace MWClass { MWBase::World *world = MWBase::Environment::get().getWorld(); Ogre::Vector3 pos(ptr.getRefData().getPosition().pos); - if(world->isUnderwater(ptr.getCell(), pos)) + if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr)) return "DefaultLandWater"; if(world->isOnGround(ptr)) return "Body Fall Medium";