From d3ab83d284688ef6489ed32c99e5229424ff8d5d Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 1 Feb 2006 07:34:12 +0000 Subject: [PATCH] assert on duplicate unlock IDs rather than behaving weird later --- stepmania/src/UnlockManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/UnlockManager.cpp b/stepmania/src/UnlockManager.cpp index 9ca0fc20d0..ec999809fa 100644 --- a/stepmania/src/UnlockManager.cpp +++ b/stepmania/src/UnlockManager.cpp @@ -431,6 +431,11 @@ void UnlockManager::Load() if( !current.IsLocked() ) current.m_bCelebrated = false; + // Make sure that we don't have duplicate unlock IDs. This can cause problems + // with UnlockCelebrate and with codes. + FOREACH_CONST( UnlockEntry, m_UnlockEntries, ue ) + ASSERT( ue->m_iEntryID != current.m_iEntryID ); + m_UnlockEntries.push_back( current ); }