diff options
author | Dinorush <62536724+Dinorush@users.noreply.github.com> | 2022-02-23 16:46:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 18:46:44 -0300 |
commit | a1cd08d5b2e8b726391539d2bfc7875dd0a1d20e (patch) | |
tree | 21d0fc6477eb67ec5153b70a19822fe221072b52 /Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut | |
parent | ec1f1f0bc95ae391736a4ecc6a181f5676d70c97 (diff) | |
download | NorthstarMods-a1cd08d5b2e8b726391539d2bfc7875dd0a1d20e.tar.gz NorthstarMods-a1cd08d5b2e8b726391539d2bfc7875dd0a1d20e.zip |
Fixes Kodai + Angel battery spawns (#224)
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut index 37b891699..345a86d9b 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_forwardbase_kodai.nut @@ -1 +1,27 @@ -//fuck
\ No newline at end of file +global function CodeCallback_MapInit + +struct { + int batteryIndex = 0 +} file + +const array<vector> BATTERY_SPAWNS = [ + < 3960, 1215.04, 942 >, // cliff + < 31, 462.459, 797 >, // mid + < -4150.21, 693.654, 1123 > // mountain +] + +void function CodeCallback_MapInit() +{ + // Battery spawns (in LTS/Free Agents) are in old locations, so we move them to the proper locations + AddSpawnCallbackEditorClass( "script_ref", "script_power_up_other", FixBatterySpawns ) +} + +void function FixBatterySpawns( entity spawn ) +{ + if ( GAMETYPE != LAST_TITAN_STANDING && GAMETYPE != FREE_AGENCY ) + return + + PowerUp powerupDef = GetPowerUpFromItemRef( expect string( spawn.kv.powerUpType ) ) + if ( powerupDef.spawnFunc() ) + spawn.SetOrigin( BATTERY_SPAWNS[file.batteryIndex++] ) +}
\ No newline at end of file |