From ef30d11ccada0a708366245ab9aa87e6c4fbede9 Mon Sep 17 00:00:00 2001 From: x3Karma Date: Thu, 21 Jul 2022 08:20:28 +0800 Subject: 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 --- Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut') diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_tffa.gnut index 30aacad54..3b75e725c 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 +} -- cgit v1.2.3