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:
parent
b01289128b
commit
4e908aa095
2 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -335,7 +335,7 @@ namespace MWSound
|
|||
while(snditer != mActiveSounds.end())
|
||||
{
|
||||
if(snditer->second.first == ptr)
|
||||
snditer->first->mPos = objpos;
|
||||
snditer->first->setPosition(objpos);
|
||||
snditer++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue