mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
Fix footstep sounds played during water-walking
This commit is contained in:
parent
064f1964ba
commit
d9165593d9
2 changed files with 5 additions and 5 deletions
|
@ -738,7 +738,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
||||||
if(world->isUnderwater(ptr.getCell(), pos))
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
||||||
return 2;
|
return 2;
|
||||||
if(world->isOnGround(ptr))
|
if(world->isOnGround(ptr))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -748,7 +748,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
||||||
if(world->isUnderwater(ptr.getCell(), pos))
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
||||||
return 3;
|
return 3;
|
||||||
if(world->isOnGround(ptr))
|
if(world->isOnGround(ptr))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -1222,7 +1222,7 @@ namespace MWClass
|
||||||
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
||||||
if(world->isSwimming(ptr))
|
if(world->isSwimming(ptr))
|
||||||
return "Swim Left";
|
return "Swim Left";
|
||||||
if(world->isUnderwater(ptr.getCell(), pos))
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
||||||
return "FootWaterLeft";
|
return "FootWaterLeft";
|
||||||
if(world->isOnGround(ptr))
|
if(world->isOnGround(ptr))
|
||||||
{
|
{
|
||||||
|
@ -1249,7 +1249,7 @@ namespace MWClass
|
||||||
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
||||||
if(world->isSwimming(ptr))
|
if(world->isSwimming(ptr))
|
||||||
return "Swim Right";
|
return "Swim Right";
|
||||||
if(world->isUnderwater(ptr.getCell(), pos))
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
||||||
return "FootWaterRight";
|
return "FootWaterRight";
|
||||||
if(world->isOnGround(ptr))
|
if(world->isOnGround(ptr))
|
||||||
{
|
{
|
||||||
|
@ -1274,7 +1274,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
|
||||||
if(world->isUnderwater(ptr.getCell(), pos))
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
||||||
return "DefaultLandWater";
|
return "DefaultLandWater";
|
||||||
if(world->isOnGround(ptr))
|
if(world->isOnGround(ptr))
|
||||||
return "Body Fall Medium";
|
return "Body Fall Medium";
|
||||||
|
|
Loading…
Reference in a new issue