make sure it's mostly harmless to call Combo redundantly

This commit is contained in:
Glenn Maynard
2003-03-26 21:32:28 +00:00
parent 6ba559f763
commit afb98a2e29
+5 -1
View File
@@ -72,7 +72,11 @@ void Combo::SetCombo( int iCombo )
m_textComboNumber.SetDiffuse( RageColor(1,1,1,1) ); // visible
m_sprCombo.SetDiffuse( RageColor(1,1,1,1) ); // visible
m_textComboNumber.SetText( ssprintf("%d", iCombo) );
CString txt = ssprintf("%d", iCombo);
/* Don't do anything if it's not changing. */
if(m_textComboNumber.GetText() == txt) return;
m_textComboNumber.SetText( txt );
float fNumberZoom = SCALE(iCombo,0.f,(float)NUMBER_MAX_ZOOM_AT,(float)NUMBER_MIN_ZOOM,(float)NUMBER_MAX_ZOOM);
CLAMP( fNumberZoom, (float)NUMBER_MIN_ZOOM, (float)NUMBER_MAX_ZOOM );
m_textComboNumber.SetZoom( fNumberZoom * (float)PULSE_ZOOM );