forked from mirror/openmw-tes3mp
Handle the "sound" events in runAnimation
This commit is contained in:
parent
df8889dcc4
commit
d77d035d3a
2 changed files with 15 additions and 14 deletions
|
@ -24,7 +24,6 @@
|
|||
#include "../mwrender/animation.hpp"
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwworld/class.hpp"
|
||||
|
@ -134,19 +133,6 @@ CharacterController::~CharacterController()
|
|||
|
||||
void CharacterController::markerEvent(float time, const std::string &evt)
|
||||
{
|
||||
if(evt.compare(0, 7, "sound: ") == 0)
|
||||
{
|
||||
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
||||
sndMgr->playSound3D(mPtr, evt.substr(7), 1.0f, 1.0f);
|
||||
return;
|
||||
}
|
||||
if(evt.compare(0, 10, "soundgen: ") == 0)
|
||||
{
|
||||
// FIXME: Lookup the SoundGen (SNDG) for the specified sound that corresponds
|
||||
// to this actor type
|
||||
return;
|
||||
}
|
||||
|
||||
if(evt == "stop")
|
||||
{
|
||||
if(mAnimQueue.size() >= 2 && mAnimQueue[0] == mAnimQueue[1])
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <OgreSceneManager.h>
|
||||
|
||||
#include "../mwbase/environment.hpp"
|
||||
#include "../mwbase/soundmanager.hpp"
|
||||
#include "../mwbase/world.hpp"
|
||||
|
||||
#include "../mwmechanics/character.hpp"
|
||||
|
@ -406,6 +407,20 @@ Ogre::Vector3 Animation::runAnimation(float timepassed)
|
|||
/* Do nothing */
|
||||
continue;
|
||||
}
|
||||
|
||||
if(evt.compare(0, 7, "sound: ") == 0)
|
||||
{
|
||||
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
||||
sndMgr->playSound3D(mPtr, evt.substr(7), 1.0f, 1.0f);
|
||||
continue;
|
||||
}
|
||||
if(evt.compare(0, 10, "soundgen: ") == 0)
|
||||
{
|
||||
// FIXME: Lookup the SoundGen (SNDG) for the specified sound that corresponds
|
||||
// to this actor type
|
||||
continue;
|
||||
}
|
||||
|
||||
if(evt == "loop stop")
|
||||
{
|
||||
if(mLooping)
|
||||
|
|
Loading…
Reference in a new issue