fix the life meter getting stuck around -0.002 with m_bMercifulDrain, because

the multiplier expects fLifePercentage to be clamped
This commit is contained in:
Glenn Maynard
2004-09-06 23:10:06 +00:00
parent 1b792a7305
commit 7a11b10426
+3
View File
@@ -111,6 +111,9 @@ void CombinedLifeMeterTug::ChangeLife( PlayerNumber pn, float fPercentToMove )
case PLAYER_2: fLifePercentage = 1 - GAMESTATE->m_fTugLifePercentP1; break;
default: ASSERT(0);
}
/* Clamp the life meter only for calculating the multiplier. */
fLifePercentage = clamp( fLifePercentage, 0.0f, 1.0f );
fPercentToMove *= SCALE( fLifePercentage, 0.f, 1.f, 0.2f, 1.f);
}