aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut7
1 files changed, 5 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
index 31c05eb36..1f06ff4a6 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
@@ -509,8 +509,11 @@ void function DropFlagIfPhased( entity player, entity flag )
OnThreadEnd( function() : ( player )
{
- if (GetGameState() == eGameState.Playing || GetGameState() == eGameState.SuddenDeath)
- DropFlag( player, true )
+ if ( IsValidPlayer( player ) )
+ {
+ if ( GetGameState() == eGameState.Playing || GetGameState() == eGameState.SuddenDeath )
+ DropFlag( player, true )
+ }
})
// the IsValid check is purely to prevent a crash due to a destroyed flag (epilogue)
while( IsValid(flag) && flag.GetParent() == player )