aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts
diff options
context:
space:
mode:
authorDBmaoha <56738369+DBmaoha@users.noreply.github.com>2023-05-02 01:25:12 +0800
committerGitHub <noreply@github.com>2023-05-01 19:25:12 +0200
commitff90171e6ad2ef660a80d02b5c68a06f94e7ad05 (patch)
treed19e33b84a293030da3df0c84e3337b26044185c /Northstar.Custom/mod/scripts/vscripts
parent0c14242f758d294187cd9cfbe7057bbe239d1ee1 (diff)
downloadNorthstarMods-ff90171e6ad2ef660a80d02b5c68a06f94e7ad05.tar.gz
NorthstarMods-ff90171e6ad2ef660a80d02b5c68a06f94e7ad05.zip
[FW] Fix Reversed Titan Spawnpoint on Boomtown (#580)
Add hack check for reversed maps
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut8
1 files changed, 8 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut
index 8a26f8bff..850aa7b37 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut
@@ -1235,10 +1235,18 @@ array<entity> function FW_GetTitanSpawnPointsForTeam( int team )
return validSpawnPoints
}
+// some maps have reversed startpoints! we need a hack
+const array<string> TITAN_POINT_REVERSED_MAPS =
+[
+ "mp_grave"
+]
+
// "Respawn as Titan" don't follow the rateSpawnPoints, fix it manually
entity function FW_ForcedTitanStartPoint( entity player, entity basePoint )
{
int team = player.GetTeam()
+ if ( TITAN_POINT_REVERSED_MAPS.contains( GetMapName() ) )
+ team = GetOtherTeam( player.GetTeam() )
array<entity> startPoints = SpawnPoints_GetTitanStart( team )
entity validPoint = startPoints[ RandomInt( startPoints.len() ) ] // choose a random( maybe not safe ) start point
return validPoint