hopefully fixed player max healther setter

This commit is contained in:
JezuzLizard
2020-05-18 04:40:42 -07:00
parent 5c4b153a04
commit d64279230e
2 changed files with 21 additions and 6 deletions

View File

@ -255,12 +255,20 @@ onplayerconnect()
onplayerspawned() onplayerspawned()
{ {
self waittill( "spawned_player" ); self endon( "disconnect" );
self._retain_perks = getDvarIntDefault( "cmPlayerRetainPerks", 0 ); while ( 1 )
self thread watch_for_respawn(); {
self.health = level.cmPlayerMaxHealth; self waittill( "spawned_player" );
self.maxHealth = self.health; self._retain_perks = getDvarIntDefault( "cmPlayerRetainPerks", 0 );
self setMaxHealth( level.cmPlayerMaxHealth ); if ( !isDefined( isFirstSpawn ) || !isFirstSpawn )
{
isFirstSpawn = 1;
self thread watch_for_respawn();
self.health = level.cmPlayerMaxHealth;
self.maxHealth = self.health;
self setMaxHealth( level.cmPlayerMaxHealth );
}
}
} }
checks() checks()
@ -603,3 +611,4 @@ init_custom_zm_powerups_gsc_exclusive_dvars()

View File

@ -20,6 +20,12 @@ Install _zm_powerups.gsc in in maps/mp/zombies
This will add support for changing a few aspects of the vanilla powerups This will add support for changing a few aspects of the vanilla powerups
# Update 5/18/20
## Main Changes
Hopefully fixed maxhealth not being set for all players
# Update 5/12/20 # Update 5/12/20
## Main Changes ## Main Changes