- SBARINFO update:

* Fixed: disabling lowerHealthCap didn't affect interpolateHealth.

SVN r1295 (trunk)
This commit is contained in:
Randy Heit 2008-11-27 17:47:37 +00:00
parent 6e83d231fe
commit ed6168ea92
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,5 @@
November 27, 2008
- Fixed: disabling lowerHealthCap didn't affect interpolateHealth.
- The co-op summary screen now has a totals row at the bottom (if it fits).
- Changed WI_drawPercent() when wi_percents is false so that the total
display is optional, and it formats it like Heretic's intermission, with

View File

@ -296,13 +296,14 @@ void DSBarInfo::Tick ()
}
else
{
if(oldHealth > CPlayer->health)
int health = SBarInfoScript->lowerHealthCap ? CPlayer->health : CPlayer->mo->health;
if(oldHealth > health)
{
oldHealth -= clamp((oldHealth - CPlayer->health) >> 2, 1, SBarInfoScript->interpolationSpeed);
oldHealth -= clamp((oldHealth - health), 1, SBarInfoScript->interpolationSpeed);
}
else if(oldHealth < CPlayer->health)
{
oldHealth += clamp((CPlayer->health - oldHealth) >> 2, 1, SBarInfoScript->interpolationSpeed);
oldHealth += clamp((health - oldHealth), 1, SBarInfoScript->interpolationSpeed);
}
}
AInventory *armor = CPlayer->mo->FindInventory<ABasicArmor>();