aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
diff options
context:
space:
mode:
authorx3Karma <juliuslimck@gmail.com>2022-07-21 08:20:28 +0800
committerGitHub <noreply@github.com>2022-07-21 02:20:28 +0200
commitef30d11ccada0a708366245ab9aa87e6c4fbede9 (patch)
tree13a29df0671a27732bf9ea54276dbd31e0fd9bb8 /Northstar.Custom
parentd585bac7d294e715ccd6a3fe48e43b43a56565b7 (diff)
downloadNorthstarMods-ef30d11ccada0a708366245ab9aa87e6c4fbede9.tar.gz
NorthstarMods-ef30d11ccada0a708366245ab9aa87e6c4fbede9.zip
Fix TFFA from crashing when a player leaves during the intro sequence (#434)
* Fix TFFA from crashing when a player leaves during the intro sequence * Fix Formatting
Diffstat (limited to 'Northstar.Custom')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut5
1 files changed, 4 insertions, 1 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut
index 30aacad5..3b75e725 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut
@@ -63,6 +63,9 @@ void function PlayerWatchesTFFAIntroIntermissionCam( entity player )
wait TFFAIntroLength
+ if ( !IsValid( player ) ) // if player leaves during the intro sequence
+ return
+
RespawnAsTitan( player, false )
TryGameModeAnnouncement( player )
}
@@ -75,4 +78,4 @@ void function AddTeamScoreForPlayerKilled( entity victim, entity attacker, var d
// why isn't this PGS_SCORE? odd game
attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, 1 )
}
-} \ No newline at end of file
+}