From 15cf157877f9d8c94d9a4d0c7dd4b6dd272fb154 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 10 Feb 2019 20:30:40 +0100 Subject: [PATCH] - removed the ActiveSequences counter. It was only used to avoid traversing the list if all sequences were paused which is an exceptional situation. On the other hand, the way it counted was not correct so rather than fixing it it seemed more appropriate to remove it entirely. # Conflicts: # src/g_levellocals.h # src/s_sndseq.cpp --- src/s_sndseq.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/s_sndseq.cpp b/src/s_sndseq.cpp index 4e0c25d06..ee0798f6e 100644 --- a/src/s_sndseq.cpp +++ b/src/s_sndseq.cpp @@ -222,7 +222,6 @@ static bool TwiddleSeqNum (int &sequence, seqtype_t type); // PUBLIC DATA DEFINITIONS ------------------------------------------------- FSoundSequencePtrArray Sequences; -int ActiveSequences; DSeqNode *DSeqNode::SequenceListHead; // PRIVATE DATA DEFINITIONS ------------------------------------------------ @@ -415,7 +414,6 @@ void DSeqNode::OnDestroy() m_Next->m_Prev = m_Prev; GC::WriteBarrier(m_Next, m_Prev); } - ActiveSequences--; Super::OnDestroy(); } @@ -835,8 +833,6 @@ void DSeqNode::ActivateSequence (int sequence) m_CurrentSoundID = 0; m_Volume = 1; // Start at max volume... m_Atten = ATTN_IDLE; // ...and idle attenuation - - ActiveSequences++; } DSeqActorNode::DSeqActorNode (AActor *actor, int sequence, int modenum) @@ -1331,7 +1327,6 @@ void DSeqNode::Tick () int seqnum = FindSequence (ENamedName(m_SequencePtr[i*2+1])); if (seqnum >= 0) { // Found a match, and it's a good one too. - ActiveSequences--; ActivateSequence (seqnum); break; } @@ -1366,7 +1361,7 @@ void SN_UpdateActiveSequences (void) { DSeqNode *node; - if (!ActiveSequences || paused) + if (paused) { // No sequences currently playing/game is paused return; }