mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Keep a sound updated with its object's position
This commit is contained in:
parent
c94653dc49
commit
f73008546f
1 changed files with 7 additions and 0 deletions
|
@ -546,6 +546,13 @@ namespace MWSound
|
|||
mActiveSounds.erase(snditer++);
|
||||
else
|
||||
{
|
||||
const MWWorld::Ptr &ptr = snditer->second.first;
|
||||
if(!ptr.isEmpty())
|
||||
{
|
||||
const ESM::Position &pos = ptr.getRefData().getPosition();
|
||||
const Ogre::Vector3 objpos(pos.pos[0], pos.pos[1], pos.pos[2]);
|
||||
snditer->first->setPosition(objpos);
|
||||
}
|
||||
snditer->first->update();
|
||||
snditer++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue