- scriptified PowerStrength.

This revealed an interesting bug: When the berserk fadout formula was changed in 2005 the result was essentially broken, resulting in values around 7000 - it only worked by happenstance because the lower 8 bits of the resulting values just happened to work to some degree and never overflowed. But the resulting fade was far too weak and a slightly different handling of the color composition code for the VM made it break down entirely.
This restores the pre-2005 formula but weakened intensity which now comes a lot closer to how it is supposed to look.
This commit is contained in:
Christoph Oelckers 2017-01-16 22:27:49 +01:00
commit 6990a46daf
6 changed files with 54 additions and 81 deletions

View file

@ -297,8 +297,8 @@ static void DrawHealth(player_t *CPlayer, int x, int y)
CR_BLUE;
const bool haveBerserk = hud_berserk_health
&& NULL != berserkpic
&& NULL != CPlayer->mo->FindInventory< APowerStrength >();
&& nullptr != berserkpic
&& nullptr != CPlayer->mo->FindInventory(PClass::FindActor(NAME_PowerStrength));
DrawImageToBox(haveBerserk ? berserkpic : healthpic, x, y, 31, 17);
DrawHudNumber(HudFont, fontcolor, health, x + 33, y + 17);