fixed a bug relating the first spawn check

Where the variable checking for first spawn wasn't attached to the player struct.
This commit is contained in:
JezuzLizard 2020-05-18 05:43:11 -07:00
parent d64279230e
commit b5cb954672
2 changed files with 5 additions and 2 deletions

View File

@ -260,9 +260,9 @@ onplayerspawned()
{ {
self waittill( "spawned_player" ); self waittill( "spawned_player" );
self._retain_perks = getDvarIntDefault( "cmPlayerRetainPerks", 0 ); self._retain_perks = getDvarIntDefault( "cmPlayerRetainPerks", 0 );
if ( !isDefined( isFirstSpawn ) || !isFirstSpawn ) if ( !isDefined( self.cmIsFirstSpawn ) || !self.cmIsFirstSpawn )
{ {
isFirstSpawn = 1; self.cmIsFirstSpawn = 1;
self thread watch_for_respawn(); self thread watch_for_respawn();
self.health = level.cmPlayerMaxHealth; self.health = level.cmPlayerMaxHealth;
self.maxHealth = self.health; self.maxHealth = self.health;
@ -612,3 +612,4 @@ init_custom_zm_powerups_gsc_exclusive_dvars()

View File

@ -26,6 +26,8 @@ This will add support for changing a few aspects of the vanilla powerups
Hopefully fixed maxhealth not being set for all players Hopefully fixed maxhealth not being set for all players
Properly set the variable checking for first spawn to be attached to the player struct
# Update 5/12/20 # Update 5/12/20
## Main Changes ## Main Changes