mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 22:45:15 -04:00
Update say sound queue explicitly once per frame
This commit is contained in:
parent
4c2b694b29
commit
c975dab7c3
@ -994,6 +994,15 @@ namespace MWSound
|
|||||||
|
|
||||||
void SoundManager::updateSounds(float duration)
|
void SoundManager::updateSounds(float duration)
|
||||||
{
|
{
|
||||||
|
// We update active say sounds map for specific actors here
|
||||||
|
// because for vanilla compatibility we can't do it immediately.
|
||||||
|
SaySoundMap::iterator queuesayiter = mSaySoundsQueue.begin();
|
||||||
|
while (queuesayiter != mSaySoundsQueue.end())
|
||||||
|
{
|
||||||
|
mActiveSaySounds[queuesayiter->first] = queuesayiter->second;
|
||||||
|
mSaySoundsQueue.erase(queuesayiter++);
|
||||||
|
}
|
||||||
|
|
||||||
static float timePassed = 0.0;
|
static float timePassed = 0.0;
|
||||||
|
|
||||||
timePassed += duration;
|
timePassed += duration;
|
||||||
@ -1076,14 +1085,7 @@ namespace MWSound
|
|||||||
++snditer;
|
++snditer;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaySoundMap::iterator sayiter = mSaySoundsQueue.begin();
|
SaySoundMap::iterator sayiter = mActiveSaySounds.begin();
|
||||||
while (sayiter != mSaySoundsQueue.end())
|
|
||||||
{
|
|
||||||
mActiveSaySounds[sayiter->first] = sayiter->second;
|
|
||||||
mSaySoundsQueue.erase(sayiter++);
|
|
||||||
}
|
|
||||||
|
|
||||||
sayiter = mActiveSaySounds.begin();
|
|
||||||
while (sayiter != mActiveSaySounds.end())
|
while (sayiter != mActiveSaySounds.end())
|
||||||
{
|
{
|
||||||
MWWorld::ConstPtr ptr = sayiter->first;
|
MWWorld::ConstPtr ptr = sayiter->first;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user