From af5a2fe5225ca5b11c5fcdf9b488345a159f3871 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. --- src/g_levellocals.h | 1 - src/p_saveg.cpp | 1 - src/s_sndseq.cpp | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/g_levellocals.h b/src/g_levellocals.h index 57fa440b9..afa6dd454 100644 --- a/src/g_levellocals.h +++ b/src/g_levellocals.h @@ -600,7 +600,6 @@ public: int airsupply; int DefaultEnvironment; // Default sound environment. - int ActiveSequences; DSeqNode *SequenceListHead; // [RH] particle globals diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 63b3fe9a6..55c04c944 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -932,7 +932,6 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload) Thinkers.DestroyAllThinkers(); interpolator.ClearInterpolations(); arc.ReadObjects(hubload); - ActiveSequences = 0; } arc("multiplayer", multiplayer); diff --git a/src/s_sndseq.cpp b/src/s_sndseq.cpp index 3d5b347e1..a9bfda24e 100644 --- a/src/s_sndseq.cpp +++ b/src/s_sndseq.cpp @@ -406,7 +406,6 @@ void DSeqNode::OnDestroy() m_Next->m_Prev = m_Prev; GC::WriteBarrier(m_Next, m_Prev); } - Level->ActiveSequences--; Super::OnDestroy(); } @@ -827,7 +826,6 @@ void DSeqNode::ActivateSequence (int sequence) m_CurrentSoundID = 0; m_Volume = 1; // Start at max volume... m_Atten = ATTN_IDLE; // ...and idle attenuation - Level->ActiveSequences++; } DSeqActorNode::DSeqActorNode (AActor *actor, int sequence, int modenum) @@ -1323,7 +1321,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. - Level->ActiveSequences--; ActivateSequence (seqnum); break; } @@ -1358,7 +1355,7 @@ void SN_UpdateActiveSequences (FLevelLocals *Level) { DSeqNode *node; - if (!Level->ActiveSequences || paused) + if (paused) { // No sequences currently playing/game is paused return; }