|
|
@ -706,6 +706,8 @@ namespace MWClass
|
|
|
|
if(name == "left")
|
|
|
|
if(name == "left")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
|
|
|
|
if(world->isFlying(ptr))
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
osg::Vec3f pos(ptr.getRefData().getPosition().asVec3());
|
|
|
|
osg::Vec3f pos(ptr.getRefData().getPosition().asVec3());
|
|
|
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
|
|
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
|
|
|
return ESM::SoundGenerator::SwimLeft;
|
|
|
|
return ESM::SoundGenerator::SwimLeft;
|
|
|
@ -716,6 +718,8 @@ namespace MWClass
|
|
|
|
if(name == "right")
|
|
|
|
if(name == "right")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
|
|
|
|
if(world->isFlying(ptr))
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
osg::Vec3f pos(ptr.getRefData().getPosition().asVec3());
|
|
|
|
osg::Vec3f pos(ptr.getRefData().getPosition().asVec3());
|
|
|
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
|
|
|
if(world->isUnderwater(ptr.getCell(), pos) || world->isWalkingOnWater(ptr))
|
|
|
|
return ESM::SoundGenerator::SwimRight;
|
|
|
|
return ESM::SoundGenerator::SwimRight;
|
|
|
|