diff options
author | DBmaoha <56738369+DBmaoha@users.noreply.github.com> | 2023-05-02 01:25:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 19:25:12 +0200 |
commit | ff90171e6ad2ef660a80d02b5c68a06f94e7ad05 (patch) | |
tree | d19e33b84a293030da3df0c84e3337b26044185c /Northstar.Custom/mod | |
parent | 0c14242f758d294187cd9cfbe7057bbe239d1ee1 (diff) | |
download | NorthstarMods-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')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fw.nut | 8 |
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 8a26f8bf..850aa7b3 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 |