From 53194543e43f8a645ba83ddb464028ba0c3b9d70 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Tue, 29 Jun 2021 23:52:45 +0100 Subject: fix lts spawn bugs and some crashes --- .../scripts/vscripts/mp/levels/mp_angel_city.nut | 18 +++++++++++++++++- .../vscripts/mp/levels/mp_black_water_canal.nut | 20 +++++++++++++++++++- .../scripts/vscripts/mp/levels/mp_grave.nut | 20 +++++++++++++++++++- 3 files changed, 55 insertions(+), 3 deletions(-) (limited to 'Northstar.CustomServers/scripts/vscripts/mp/levels') diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city.nut index 3a5b637fa..68b49ad59 100644 --- a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city.nut +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_angel_city.nut @@ -1,11 +1,27 @@ global function CodeCallback_MapInit void function CodeCallback_MapInit() -{ +{ Evac_AddLocation( < 2527.889893, -2865.360107, 753.002991 >, < 0, -80.54, 0 > ) Evac_AddLocation( < 1253.530029, -554.075012, 811.125 >, < 0, 180, 0 > ) Evac_AddLocation( < 2446.989990, 809.364014, 576.0 >, < 0, 90.253, 0 > ) Evac_AddLocation( < -2027.430054, 960.395020, 609.007996 >, < 0, 179.604, 0 > ) Evac_SetSpacePosition( < -1700, -5500, -7600 >, < -3.620642, 270.307129, 0 > ) + + // todo: also we need to change the powerup spawns on this map, they use a version from an older patch + + // there are some really busted titan startspawns that are on the fucking other side of the map from where they should be, so we remove them + AddSpawnCallback( "info_spawnpoint_titan_start", TrimBadTitanStartSpawns ) +} + +void function TrimBadTitanStartSpawns( entity spawn ) +{ + if ( spawn.GetTeam() == TEAM_MILITIA ) + return // mil spawns are fine on this map + + vector comparisonOrigin = < 2281.39, -3333.06, 200.031 > + + if ( Distance2D( spawn.GetOrigin(), comparisonOrigin ) >= 2000.0 ) + spawn.Destroy() } \ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal.nut index 37b891699..2e35417fe 100644 --- a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal.nut +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_black_water_canal.nut @@ -1 +1,19 @@ -//fuck \ No newline at end of file +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + // there are some really busted titan startspawns that are on the fucking other side of the map from where they should be, so we remove them + AddSpawnCallback( "info_spawnpoint_titan_start", TrimBadTitanStartSpawns ) +} + +void function TrimBadTitanStartSpawns( entity spawn ) +{ + vector comparisonOrigin + if ( spawn.GetTeam() == TEAM_IMC ) + comparisonOrigin = < 160.625, 4748.13, -251.447 > + else + comparisonOrigin = < 1087.13, -4914.88, -199.969 > + + if ( Distance2D( spawn.GetOrigin(), comparisonOrigin ) >= 1000.0) + spawn.Destroy() +} \ No newline at end of file diff --git a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave.nut b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave.nut index 37b891699..f4b48f6d4 100644 --- a/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave.nut +++ b/Northstar.CustomServers/scripts/vscripts/mp/levels/mp_grave.nut @@ -1 +1,19 @@ -//fuck \ No newline at end of file +global function CodeCallback_MapInit + +void function CodeCallback_MapInit() +{ + // there are some really busted titan startspawns that are on the fucking other side of the map from where they should be, so we remove them + AddSpawnCallback( "info_spawnpoint_titan_start", TrimBadTitanStartSpawns ) +} + +void function TrimBadTitanStartSpawns( entity spawn ) +{ + vector comparisonOrigin + if ( spawn.GetTeam() == TEAM_IMC ) + comparisonOrigin = < -2144, -4944, 1999.7 > + else + comparisonOrigin = < 11026.8, -5163.18, 1885.64 > + + if ( Distance2D( spawn.GetOrigin(), comparisonOrigin ) >= 2000.0 ) + spawn.Destroy() +} \ No newline at end of file -- cgit v1.2.3