1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-01 12:15:35 +00:00

Add a method to set the sound's position

This commit is contained in:
Chris Robinson 2012-03-31 01:34:26 -07:00
parent b01289128b
commit 4e908aa095
2 changed files with 2 additions and 1 deletions

View file

@ -22,6 +22,7 @@ namespace MWSound
public:
virtual void stop() = 0;
virtual bool isPlaying() = 0;
void setPosition(const Ogre::Vector3 &pos) { mPos = pos; }
void setVolume(float volume) { mVolume = volume; }
Sound() : mPos(0.0f, 0.0f, 0.0f)

View file

@ -335,7 +335,7 @@ namespace MWSound
while(snditer != mActiveSounds.end())
{
if(snditer->second.first == ptr)
snditer->first->mPos = objpos;
snditer->first->setPosition(objpos);
snditer++;
}
}