mirror of
https://github.com/ENSL/NS.git
synced 2024-11-25 14:01:03 +00:00
fix not healing at the armory after getting getting into the command chair with low health
This commit is contained in:
parent
09c48fa653
commit
09a9b4870f
1 changed files with 4 additions and 1 deletions
|
@ -3664,7 +3664,10 @@ void AvHPlayer::InitializeFromTeam(float inHealthPercentage, float inArmorPercen
|
||||||
{
|
{
|
||||||
// Set base health and armor
|
// Set base health and armor
|
||||||
int theMaxHealth = AvHPlayerUpgrade::GetMaxHealth(this->pev->iuser4, (AvHUser3)this->pev->iuser3, this->GetExperienceLevel());
|
int theMaxHealth = AvHPlayerUpgrade::GetMaxHealth(this->pev->iuser4, (AvHUser3)this->pev->iuser3, this->GetExperienceLevel());
|
||||||
this->pev->health = this->pev->max_health = max(theMaxHealth*inHealthPercentage,1.0f);//: prevent bug with players evolving down from higher lifeform from getting negative health but still "alive"
|
//this->pev->health = this->pev->max_health = max(theMaxHealth*inHealthPercentage,1.0f);//: prevent bug with players evolving down from higher lifeform from getting negative health but still "alive"
|
||||||
|
// 2024 - Fix max health being set below 100 when leaving the command chair.
|
||||||
|
this->pev->max_health = theMaxHealth;
|
||||||
|
this->pev->health = max(theMaxHealth * inHealthPercentage, 1.0f);
|
||||||
|
|
||||||
this->pev->armorvalue = AvHPlayerUpgrade::GetMaxArmorLevel(this->pev->iuser4, (AvHUser3)this->pev->iuser3)*inArmorPercentage;
|
this->pev->armorvalue = AvHPlayerUpgrade::GetMaxArmorLevel(this->pev->iuser4, (AvHUser3)this->pev->iuser3)*inArmorPercentage;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue