Multiplayer: fix VoiceChat shutdown assert on remoteMachines count

This commit is contained in:
Stephen Saunders 2024-01-19 23:14:53 -05:00
parent 4569238301
commit 7b2aa46a43

View file

@ -48,7 +48,11 @@ void idVoiceChatMgr::Shutdown()
// We shouldn't have voice users if everything shutdown correctly
assert( talkers.Num() == 0 );
assert( remoteMachines.Num() == 0 );
for( int i = remoteMachines.Num() - 1; i >= 0; i-- )
{
assert( remoteMachines[i].refCount == 0 );
remoteMachines.RemoveIndex( i );
}
}
/*
@ -667,4 +671,4 @@ bool idVoiceChatMgr::HasHeadsetStateChanged( int talkerIndex )
talker.hasHeadsetChanged = false;
return ret;
}
}