Commit 14243991 authored by Capostrophic's avatar Capostrophic

Disable any footstep sounds when flying (bug #4948)

parent 7202f457
......@@ -52,6 +52,7 @@
Bug #4922: Werewolves can not attack if the transformation happens during attack
Bug #4938: Strings from subrecords with actually empty headers can't be empty
Bug #4942: Hand-to-Hand attack type is chosen randomly when "always use best attack" is turned off
Bug #4948: Footstep sounds while levitating on ground level
Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis
......
......@@ -706,6 +706,8 @@ namespace MWClass
if(name == "left")
{
MWBase::World *world = MWBase::Environment::get().getWorld();
if(world->isFlying(ptr))
return -1;
osg::Vec3f pos(ptr.getRefData().getPosition().asVec3());
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
return ESM::SoundGenerator::SwimLeft;
......@@ -716,6 +718,8 @@ namespace MWClass
if(name == "right")
{
MWBase::World *world = MWBase::Environment::get().getWorld();
if(world->isFlying(ptr))
return -1;
osg::Vec3f pos(ptr.getRefData().getPosition().asVec3());
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
return ESM::SoundGenerator::SwimRight;
......
......@@ -1214,6 +1214,8 @@ namespace MWClass
if(name == "left" || name == "right")
{
MWBase::World *world = MWBase::Environment::get().getWorld();
if(world->isFlying(ptr))
return std::string();
osg::Vec3f pos(ptr.getRefData().getPosition().asVec3());
if(world->isSwimming(ptr))
return (name == "left") ? "Swim Left" : "Swim Right";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment