- fixed: Degeneration should use the same base health value as all the rest of the engine.

- also replaced deh.MaxHealth in the bot code which was the only other remaining case where this was used as health limiter.
This commit is contained in:
Christoph Oelckers 2016-11-04 11:32:57 +01:00
commit 540f20882e
2 changed files with 5 additions and 4 deletions

View file

@ -2677,10 +2677,11 @@ void P_PlayerThink (player_t *player)
// Apply degeneration.
if (dmflags2 & DF2_YES_DEGENERATION)
{
if ((level.time % TICRATE) == 0 && player->health > deh.MaxHealth)
int maxhealth = player->mo->GetMaxHealth() + player->mo->stamina;
if ((level.time % TICRATE) == 0 && player->health > maxhealth)
{
if (player->health - 5 < deh.MaxHealth)
player->health = deh.MaxHealth;
if (player->health - 5 < maxhealth)
player->health = maxhealth;
else
player->health--;