1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Add NPC landing sounds for soundgen keys

This commit is contained in:
Chris Robinson 2013-08-19 08:58:50 -07:00
parent 2ec39f3622
commit dca599b8c5

View File

@ -1021,6 +1021,16 @@ namespace MWClass
}
return "";
}
if(name == "land")
{
MWBase::World *world = MWBase::Environment::get().getWorld();
Ogre::Vector3 pos(ptr.getRefData().getPosition().pos);
if(world->isUnderwater(ptr.getCell(), pos))
return "DefaultLandWater";
if(world->isOnGround(ptr))
return "Body Fall Medium";
return "";
}
if(name == "swimleft")
return "Swim Left";
if(name == "swimright")
@ -1034,8 +1044,6 @@ namespace MWClass
return "";
if(name == "scream")
return "";
if(name == "land")
return "";
throw std::runtime_error(std::string("Unexpected soundgen type: ")+name);
}