aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorZanieon <william-millennium@hotmail.com>2024-08-30 15:11:51 +0200
committerZanieon <william-millennium@hotmail.com>2024-08-30 15:11:51 +0200
commitbd77a936a90f4b30c5e88b5fa26e4d995930d9ff (patch)
tree1a1778184435d0aad0def66a85cb8b51f40a76ce /Northstar.CustomServers/mod/scripts/vscripts/gamemodes
parentdafc1d1e9729093b00fd27bc3083133f6af4d4b7 (diff)
downloadNorthstarMods-bd77a936a90f4b30c5e88b5fa26e4d995930d9ff.tar.gz
NorthstarMods-bd77a936a90f4b30c5e88b5fa26e4d995930d9ff.zip
Move `CTFInitPlayer` function
as part of the refactoring effort in #830
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut24
1 files changed, 12 insertions, 12 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
index 7375d199..e1c179b5 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
@@ -91,18 +91,6 @@ bool function VerifyCTFSpawnpoint( entity spawnpoint, int team )
return true
}
-void function CTFInitPlayer( entity player )
-{
- if ( !IsValid( file.imcFlagSpawn ) )
- return
-
- vector imcSpawn = file.imcFlagSpawn.GetOrigin()
- Remote_CallFunction_NonReplay( player, "ServerCallback_SetFlagHomeOrigin", TEAM_IMC, imcSpawn.x, imcSpawn.y, imcSpawn.z )
-
- vector militiaSpawn = file.militiaFlagSpawn.GetOrigin()
- Remote_CallFunction_NonReplay( player, "ServerCallback_SetFlagHomeOrigin", TEAM_MILITIA, militiaSpawn.x, militiaSpawn.y, militiaSpawn.z )
-}
-
void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
if ( !IsValid( GetFlagForTeam( GetOtherTeam( victim.GetTeam() ) ) ) ) // getting a crash idk
@@ -236,6 +224,18 @@ void function RemoveFlags()
SetFlagStateForTeam( TEAM_IMC, eFlagState.None )
}
+void function CTFInitPlayer( entity player )
+{
+ if ( !IsValid( file.imcFlagSpawn ) )
+ return
+
+ vector imcSpawn = file.imcFlagSpawn.GetOrigin()
+ Remote_CallFunction_NonReplay( player, "ServerCallback_SetFlagHomeOrigin", TEAM_IMC, imcSpawn.x, imcSpawn.y, imcSpawn.z )
+
+ vector militiaSpawn = file.militiaFlagSpawn.GetOrigin()
+ Remote_CallFunction_NonReplay( player, "ServerCallback_SetFlagHomeOrigin", TEAM_MILITIA, militiaSpawn.x, militiaSpawn.y, militiaSpawn.z )
+}
+
void function TrackFlagReturnTrigger( entity flag, entity returnTrigger )
{
// this is a bit of a hack, it seems parenting the return trigger to the flag actually sets the pickup radius of the flag to be the same as the trigger