aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorZanieon <william-millennium@hotmail.com>2024-08-30 14:59:47 +0200
committerZanieon <william-millennium@hotmail.com>2024-08-30 14:59:47 +0200
commit3eb15eef1123f71e09e773adb15f52b5fa63a179 (patch)
treeb928b6ee8a2594a3e55c5fea4d9bf13c785cc079 /Northstar.CustomServers/mod/scripts/vscripts/gamemodes
parent6cd957e93f8eccf42d7cb08afc19fd4650ee0efd (diff)
downloadNorthstarMods-3eb15eef1123f71e09e773adb15f52b5fa63a179.tar.gz
NorthstarMods-3eb15eef1123f71e09e773adb15f52b5fa63a179.zip
Move `SetFlagStateForTeam` to end of file
in an effort to have all related functions close to each other
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut21
1 files changed, 11 insertions, 10 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
index 6033940b..81971e00 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
@@ -249,15 +249,6 @@ void function TrackFlagReturnTrigger( entity flag, entity returnTrigger )
}
}
-void function SetFlagStateForTeam( int team, int state )
-{
- if ( state == eFlagState.Away ) // we tell the client the flag is the player carrying it if they're carrying it
- SetGlobalNetEnt( team == TEAM_IMC ? "imcFlag" : "milFlag", ( team == TEAM_IMC ? file.imcFlag : file.militiaFlag ).GetParent() )
- else
- SetGlobalNetEnt( team == TEAM_IMC ? "imcFlag" : "milFlag", team == TEAM_IMC ? file.imcFlag : file.militiaFlag )
-
- SetGlobalNetInt( team == TEAM_IMC ? "imcFlagState" : "milFlagState", state )
-}
bool function OnFlagCollected( entity player, entity flag )
{
@@ -524,4 +515,14 @@ 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
+}
+
+void function SetFlagStateForTeam( int team, int state )
+{
+ if ( state == eFlagState.Away ) // we tell the client the flag is the player carrying it if they're carrying it
+ SetGlobalNetEnt( team == TEAM_IMC ? "imcFlag" : "milFlag", ( team == TEAM_IMC ? file.imcFlag : file.militiaFlag ).GetParent() )
+ else
+ SetGlobalNetEnt( team == TEAM_IMC ? "imcFlag" : "milFlag", team == TEAM_IMC ? file.imcFlag : file.militiaFlag )
+
+ SetGlobalNetInt( team == TEAM_IMC ? "imcFlagState" : "milFlagState", state )
+}