mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 07:21:12 +00:00
Add a method to set the sound's position
This commit is contained in:
parent
b01289128b
commit
4e908aa095
@ -22,6 +22,7 @@ namespace MWSound
|
|||||||
public:
|
public:
|
||||||
virtual void stop() = 0;
|
virtual void stop() = 0;
|
||||||
virtual bool isPlaying() = 0;
|
virtual bool isPlaying() = 0;
|
||||||
|
void setPosition(const Ogre::Vector3 &pos) { mPos = pos; }
|
||||||
void setVolume(float volume) { mVolume = volume; }
|
void setVolume(float volume) { mVolume = volume; }
|
||||||
|
|
||||||
Sound() : mPos(0.0f, 0.0f, 0.0f)
|
Sound() : mPos(0.0f, 0.0f, 0.0f)
|
||||||
|
@ -335,7 +335,7 @@ namespace MWSound
|
|||||||
while(snditer != mActiveSounds.end())
|
while(snditer != mActiveSounds.end())
|
||||||
{
|
{
|
||||||
if(snditer->second.first == ptr)
|
if(snditer->second.first == ptr)
|
||||||
snditer->first->mPos = objpos;
|
snditer->first->setPosition(objpos);
|
||||||
snditer++;
|
snditer++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user