Change: MUCH Cleaner fix for lifebar.

This commit is contained in:
Charles Lohr
2005-01-26 14:08:02 +00:00
parent 47355ec6f6
commit a77a947dd0
+4 -8
View File
@@ -495,14 +495,6 @@ bool LifeMeterBar::IsFailing() const
void LifeMeterBar::Update( float fDeltaTime )
{
// HACK: Prevent 'Dead on Start' appearance
// the way the physics work, if there is an unusually
// larget delta, it will cause the meter to have a very
// strange effect.
//
if ( fDeltaTime >= 2.0 )
return;
LifeMeter::Update( fDeltaTime );
@@ -524,6 +516,10 @@ void LifeMeterBar::Update( float fDeltaTime )
m_fTrailingLifePercentage += m_fLifeVelocity * fDeltaTime;
}
//It doesn't make sense to have a heavily negetive
//or heavily overloaded lifebar.
CLAMP( m_fTrailingLifePercentage, -0.1f, 2.0f );
m_fPassingAlpha += IsPastPassmark() ? +fDeltaTime*2 : -fDeltaTime*2;
CLAMP( m_fPassingAlpha, 0, 1 );