assert on duplicate unlock IDs rather than behaving weird later

This commit is contained in:
Chris Danford
2006-02-01 07:34:12 +00:00
parent 711b88767e
commit d3ab83d284
+5
View File
@@ -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 );
}