1
0
Fork 1
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:
Chris Robinson 2013-07-27 07:24:18 -07:00
parent c94653dc49
commit f73008546f

View file

@ -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++;
}