mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-07-02 18:10:26 -05:00
Encounter: fix health resetting on revived
This commit is contained in:
@ -190,12 +190,14 @@ perk_think( perk )
|
||||
perk_set_max_health_if_jugg( perk, set_premaxhealth, clamp_health_to_max_health )
|
||||
{
|
||||
max_total_health = undefined;
|
||||
|
||||
if ( perk == "specialty_armorvest" )
|
||||
{
|
||||
if ( set_premaxhealth )
|
||||
{
|
||||
self.premaxhealth = self.maxhealth;
|
||||
}
|
||||
|
||||
max_total_health = level.zombie_vars[ "zombie_perk_juggernaut_health" ];
|
||||
}
|
||||
else if ( perk == "specialty_armorvest_upgrade" )
|
||||
@ -204,6 +206,7 @@ perk_set_max_health_if_jugg( perk, set_premaxhealth, clamp_health_to_max_health
|
||||
{
|
||||
self.premaxhealth = self.maxhealth;
|
||||
}
|
||||
|
||||
max_total_health = level.zombie_vars[ "zombie_perk_juggernaut_health_upgrade" ];
|
||||
}
|
||||
else if ( perk == "jugg_upgrade" )
|
||||
@ -212,6 +215,7 @@ perk_set_max_health_if_jugg( perk, set_premaxhealth, clamp_health_to_max_health
|
||||
{
|
||||
self.premaxhealth = self.maxhealth;
|
||||
}
|
||||
|
||||
if ( self hasperk( "specialty_armorvest" ) )
|
||||
{
|
||||
max_total_health = level.zombie_vars[ "zombie_perk_juggernaut_health" ];
|
||||
@ -222,22 +226,33 @@ perk_set_max_health_if_jugg( perk, set_premaxhealth, clamp_health_to_max_health
|
||||
}
|
||||
}
|
||||
else if ( perk == "health_reboot" )
|
||||
{
|
||||
if ( self hasperk( "specialty_armorvest" ) )
|
||||
{
|
||||
max_total_health = level.zombie_vars[ "zombie_perk_juggernaut_health" ];
|
||||
}
|
||||
else
|
||||
{
|
||||
max_total_health = level.player_starting_health;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isDefined( max_total_health ) )
|
||||
{
|
||||
if ( self maps/mp/zombies/_zm_pers_upgrades_functions::pers_jugg_active() )
|
||||
{
|
||||
max_total_health += level.pers_jugg_upgrade_health_bonus;
|
||||
}
|
||||
|
||||
if ( is_true( level.sudden_death ) && isDefined( level.sudden_death_health_loss ) )
|
||||
{
|
||||
max_total_health -= level.sudden_death_health_loss;
|
||||
}
|
||||
|
||||
missinghealth = self.maxhealth - self.health;
|
||||
self setmaxhealth( max_total_health );
|
||||
self.health -= missinghealth;
|
||||
|
||||
if ( isDefined( clamp_health_to_max_health ) && clamp_health_to_max_health == 1 )
|
||||
{
|
||||
if ( self.health > self.maxhealth )
|
||||
|
@ -1940,6 +1940,18 @@ grief_laststand_weapons_return()
|
||||
|
||||
self thread grief_laststand_items_return();
|
||||
|
||||
if(is_true(self._retain_perks))
|
||||
{
|
||||
if(isDefined(self.grief_savedperks))
|
||||
{
|
||||
self.perks_active = [];
|
||||
foreach(perk in self.grief_savedperks)
|
||||
{
|
||||
self maps/mp/zombies/_zm_perks::give_perk(perk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.grief_savedweapon_weapons = undefined;
|
||||
|
||||
primaries = self getweaponslistprimaries();
|
||||
@ -2045,18 +2057,6 @@ grief_laststand_items_return()
|
||||
self [[ self.player_shield_reset_health ]]();
|
||||
}
|
||||
}
|
||||
|
||||
if(is_true(self._retain_perks))
|
||||
{
|
||||
if(isDefined(self.grief_savedperks))
|
||||
{
|
||||
self.perks_active = [];
|
||||
foreach(perk in self.grief_savedperks)
|
||||
{
|
||||
self maps/mp/zombies/_zm_perks::give_perk(perk);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sudden_death()
|
||||
|
Reference in New Issue
Block a user