aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut48
1 files changed, 24 insertions, 24 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
index 752aa907..3c5eb12c 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ctf.nut
@@ -67,30 +67,6 @@ void function CaptureTheFlag_Init()
ScoreEvent_SetEarnMeterValues( "FlagReturn", 0.0, 0.20 )
}
-void function RateSpawnpoints_CTF( int checkClass, array<entity> spawnpoints, int team, entity player )
-{
- RateSpawnpoints_SpawnZones( checkClass, spawnpoints, team, player )
-}
-
-bool function VerifyCTFSpawnpoint( entity spawnpoint, int team )
-{
- // ensure spawnpoints aren't too close to enemy base
- vector allyFlagSpot
- vector enemyFlagSpot
- foreach ( entity spawn in GetEntArrayByClass_Expensive( "info_spawnpoint_flag" ) )
- {
- if( spawn.GetTeam() == team )
- allyFlagSpot = spawn.GetOrigin()
- else
- enemyFlagSpot = spawn.GetOrigin()
- }
-
- if( Distance2D( spawnpoint.GetOrigin(), allyFlagSpot ) > Distance2D( spawnpoint.GetOrigin(), enemyFlagSpot ) )
- return false
-
- return true
-}
-
void function CreateFlags()
{
if ( IsValid( file.imcFlagSpawn ) )
@@ -211,6 +187,30 @@ void function RemoveFlags()
SetFlagStateForTeam( TEAM_IMC, eFlagState.None )
}
+void function RateSpawnpoints_CTF( int checkClass, array<entity> spawnpoints, int team, entity player )
+{
+ RateSpawnpoints_SpawnZones( checkClass, spawnpoints, team, player )
+}
+
+bool function VerifyCTFSpawnpoint( entity spawnpoint, int team )
+{
+ // ensure spawnpoints aren't too close to enemy base
+ vector allyFlagSpot
+ vector enemyFlagSpot
+ foreach ( entity spawn in GetEntArrayByClass_Expensive( "info_spawnpoint_flag" ) )
+ {
+ if( spawn.GetTeam() == team )
+ allyFlagSpot = spawn.GetOrigin()
+ else
+ enemyFlagSpot = spawn.GetOrigin()
+ }
+
+ if( Distance2D( spawnpoint.GetOrigin(), allyFlagSpot ) > Distance2D( spawnpoint.GetOrigin(), enemyFlagSpot ) )
+ return false
+
+ return true
+}
+
void function CTFInitPlayer( entity player )
{
if ( !IsValid( file.imcFlagSpawn ) )