From 7a11b104262ffa2a40100f3fb39ca8c124e0a391 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 6 Sep 2004 23:10:06 +0000 Subject: [PATCH] fix the life meter getting stuck around -0.002 with m_bMercifulDrain, because the multiplier expects fLifePercentage to be clamped --- stepmania/src/CombinedLifeMeterTug.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/CombinedLifeMeterTug.cpp b/stepmania/src/CombinedLifeMeterTug.cpp index 9e0b68e807..322644cab3 100644 --- a/stepmania/src/CombinedLifeMeterTug.cpp +++ b/stepmania/src/CombinedLifeMeterTug.cpp @@ -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); }