- added parameter to PLayerPawn::GetMaxHealth to return the real maximum health, including stamina upgrades.

This commit is contained in:
Christoph Oelckers 2017-03-01 00:04:17 +01:00
commit cb295e0441
7 changed files with 14 additions and 11 deletions

View file

@ -358,7 +358,7 @@ void DBot::WhatToGet (AActor *item)
}
else if ((typeis (Megasphere) || typeis (Soulsphere) || typeis (HealthBonus)) && player->mo->health >= deh.MaxSoulsphere)
return;
else if (item->IsKindOf (PClass::FindActor(NAME_Health)) && player->mo->health >= player->mo->GetMaxHealth() + player->mo->stamina)
else if (item->IsKindOf (PClass::FindActor(NAME_Health)) && player->mo->health >= player->mo->GetMaxHealth(true))
return;
if ((dest == NULL ||