don't clamp super meter

This commit is contained in:
Chris Danford
2004-05-16 05:06:58 +00:00
parent c53b2100e8
commit a8882ff9d0
2 changed files with 8 additions and 4 deletions
+6 -4
View File
@@ -56,10 +56,13 @@ CombinedLifeMeterTug::CombinedLifeMeterTug()
void CombinedLifeMeterTug::Update( float fDelta )
{
m_Stream[PLAYER_1].SetPercent( GAMESTATE->m_fTugLifePercentP1 );
m_Stream[PLAYER_2].SetPercent( 1-GAMESTATE->m_fTugLifePercentP1 );
float fPercentToShow = GAMESTATE->m_fTugLifePercentP1;
CLAMP( fPercentToShow, 0.f, 1.f );
float fSeparatorX = SCALE( GAMESTATE->m_fTugLifePercentP1, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f );
m_Stream[PLAYER_1].SetPercent( fPercentToShow );
m_Stream[PLAYER_2].SetPercent( 1-fPercentToShow );
float fSeparatorX = SCALE( fPercentToShow, 0.f, 1.f, -METER_WIDTH/2.f, +METER_WIDTH/2.f );
m_sprSeparator.SetX( fSeparatorX );
@@ -128,5 +131,4 @@ void CombinedLifeMeterTug::ChangeLife( PlayerNumber pn, float fPercentToMove )
case PLAYER_2: GAMESTATE->m_fTugLifePercentP1 -= fPercentToMove; break;
default: ASSERT(0);
}
CLAMP( GAMESTATE->m_fTugLifePercentP1, 0, 1 );
}
+2
View File
@@ -44,6 +44,8 @@ void GraphDisplay::LoadFromStageStats( const StageStats &s, PlayerNumber pn )
memcpy( m_LastValues, m_CurValues, sizeof(m_CurValues) );
m_Position = 0;
s.GetLifeRecord( pn, m_DestValues, VALUE_RESOLUTION );
for( int i=0; i<ARRAYSIZE(m_DestValues); i++ )
CLAMP( m_DestValues[i], 0.f, 1.f );
UpdateVerts();
}