Disable any footstep sounds when flying (bug #4948)

pull/541/head
Capostrophic 6 years ago
parent 7202f45771
commit 1424399118

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

Loading…
Cancel
Save