- 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.
This commit is contained in:
Christoph Oelckers 2019-02-10 20:30:40 +01:00
parent 072018bda2
commit af5a2fe522
3 changed files with 1 additions and 6 deletions

View file

@ -600,7 +600,6 @@ public:
int airsupply; int airsupply;
int DefaultEnvironment; // Default sound environment. int DefaultEnvironment; // Default sound environment.
int ActiveSequences;
DSeqNode *SequenceListHead; DSeqNode *SequenceListHead;
// [RH] particle globals // [RH] particle globals

View file

@ -932,7 +932,6 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
Thinkers.DestroyAllThinkers(); Thinkers.DestroyAllThinkers();
interpolator.ClearInterpolations(); interpolator.ClearInterpolations();
arc.ReadObjects(hubload); arc.ReadObjects(hubload);
ActiveSequences = 0;
} }
arc("multiplayer", multiplayer); arc("multiplayer", multiplayer);

View file

@ -406,7 +406,6 @@ void DSeqNode::OnDestroy()
m_Next->m_Prev = m_Prev; m_Next->m_Prev = m_Prev;
GC::WriteBarrier(m_Next, m_Prev); GC::WriteBarrier(m_Next, m_Prev);
} }
Level->ActiveSequences--;
Super::OnDestroy(); Super::OnDestroy();
} }
@ -827,7 +826,6 @@ void DSeqNode::ActivateSequence (int sequence)
m_CurrentSoundID = 0; m_CurrentSoundID = 0;
m_Volume = 1; // Start at max volume... m_Volume = 1; // Start at max volume...
m_Atten = ATTN_IDLE; // ...and idle attenuation m_Atten = ATTN_IDLE; // ...and idle attenuation
Level->ActiveSequences++;
} }
DSeqActorNode::DSeqActorNode (AActor *actor, int sequence, int modenum) DSeqActorNode::DSeqActorNode (AActor *actor, int sequence, int modenum)
@ -1323,7 +1321,6 @@ void DSeqNode::Tick ()
int seqnum = FindSequence (ENamedName(m_SequencePtr[i*2+1])); int seqnum = FindSequence (ENamedName(m_SequencePtr[i*2+1]));
if (seqnum >= 0) if (seqnum >= 0)
{ // Found a match, and it's a good one too. { // Found a match, and it's a good one too.
Level->ActiveSequences--;
ActivateSequence (seqnum); ActivateSequence (seqnum);
break; break;
} }
@ -1358,7 +1355,7 @@ void SN_UpdateActiveSequences (FLevelLocals *Level)
{ {
DSeqNode *node; DSeqNode *node;
if (!Level->ActiveSequences || paused) if (paused)
{ // No sequences currently playing/game is paused { // No sequences currently playing/game is paused
return; return;
} }