Get the object reference's position once when updating its sounds

This commit is contained in:
Chris Robinson 2012-03-24 08:12:04 -07:00
parent 5cb90ab704
commit 71d3f9bd51

View file

@ -308,10 +308,10 @@ namespace MWSound
if(snditer == mActiveSounds.end())
return;
const ESM::Position &pos = ptr.getCellRef().pos;
IDMap::iterator iditer = snditer->second.begin();
while(iditer != snditer->second.end())
{
const ESM::Position &pos = ptr.getCellRef().pos;
iditer->second->update(pos.pos);
iditer++;
}