From 71d3f9bd512edc078272468e1243e2deaee1bb0e Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 24 Mar 2012 08:12:04 -0700 Subject: [PATCH] Get the object reference's position once when updating its sounds --- apps/openmw/mwsound/soundmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwsound/soundmanager.cpp b/apps/openmw/mwsound/soundmanager.cpp index 272956082a..3b1f188e70 100644 --- a/apps/openmw/mwsound/soundmanager.cpp +++ b/apps/openmw/mwsound/soundmanager.cpp @@ -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++; }