aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/scripts/vscripts/gamemodes
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-17 23:46:52 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-17 23:46:52 +0100
commit27bd240871b7c0f2f49fef137718b2e3c208e3b4 (patch)
treea46f401fa389edbb42a32fe8674cbde3a28e7632 /Northstar.CustomServers/scripts/vscripts/gamemodes
parent1c1d36fad84687a93a629525145c557f78cbf673 (diff)
downloadNorthstarMods-27bd240871b7c0f2f49fef137718b2e3c208e3b4.tar.gz
NorthstarMods-27bd240871b7c0f2f49fef137718b2e3c208e3b4.zip
ctf switchsides spawn fix (untested)
Diffstat (limited to 'Northstar.CustomServers/scripts/vscripts/gamemodes')
-rw-r--r--Northstar.CustomServers/scripts/vscripts/gamemodes/_gamemode_ctf.nut8
1 files changed, 6 insertions, 2 deletions
diff --git a/Northstar.CustomServers/scripts/vscripts/gamemodes/_gamemode_ctf.nut b/Northstar.CustomServers/scripts/vscripts/gamemodes/_gamemode_ctf.nut
index 728d742df..704f55d3b 100644
--- a/Northstar.CustomServers/scripts/vscripts/gamemodes/_gamemode_ctf.nut
+++ b/Northstar.CustomServers/scripts/vscripts/gamemodes/_gamemode_ctf.nut
@@ -69,8 +69,12 @@ void function RateSpawnpoints_CTF( int checkClass, array<entity> spawnpoints, in
// if there are, spawn them outside of it ( but ideally still close )
// max distance away should be like, angel city markets
- array<entity> startSpawns = SpawnPoints_GetPilotStart( team )
- array<entity> enemyPlayers = GetPlayerArrayOfTeam_Alive( GetOtherTeam( team ) )
+ int spawnTeam = team
+ if ( HasSwitchedSides() )
+ spawnTeam = GetOtherTeam( team )
+
+ array<entity> startSpawns = SpawnPoints_GetPilotStart( spawnTeam )
+ array<entity> enemyPlayers = GetPlayerArrayOfTeam_Alive( GetOtherTeam( spawnTeam ) )
vector startSpawnAverage
bool enemyInBase = false