diff options
author | alt4 <alt4@users.noreply.github.com> | 2022-01-27 14:32:32 +0100 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-01-28 19:49:40 -0300 |
commit | cca41c857da003aa31aa43feec090c1f0c4381e2 (patch) | |
tree | 489a2261fb4057cb7deddedaf56575fdf0713d30 /Northstar.CustomServers/mod/scripts/vscripts | |
parent | daa93d2afb697b2538e80c802cded459ba627af0 (diff) | |
download | NorthstarMods-cca41c857da003aa31aa43feec090c1f0c4381e2.tar.gz NorthstarMods-cca41c857da003aa31aa43feec090c1f0c4381e2.zip |
Check if flag is still valid before looping
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut | 4 |
1 files changed, 2 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 dc976059..fa6643ab 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut @@ -334,7 +334,7 @@ void function DropFlagIfPhased( entity player, entity flag ) DropFlag( player, true ) }) - while( flag.GetParent() == player ) + while( IsValid( flag ) && flag.GetParent() == player ) WaitFrame() } @@ -519,4 +519,4 @@ void function TryReturnFlag( entity player, entity flag ) MessageToTeam( GetOtherTeam( flag.GetTeam() ), eEventNotifications.PlayerReturnedEnemyFlag, null, player ) EmitSoundOnEntityToTeam( flag, "UI_CTF_3P_EnemyReturnsFlag", GetOtherTeam( flag.GetTeam() ) ) PlayFactionDialogueToTeam( "ctf_flagReturnedEnemy", GetOtherTeam( flag.GetTeam() ) ) -}
\ No newline at end of file +} |