From f8685213baf4eef93dae6cc98c8e4a8318565bd3 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Sun, 19 Dec 2021 17:32:09 +0000 Subject: fixes and dropship refactor --- .../mod/scripts/vscripts/mp/levels/mp_lf_deck.nut | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut index dca30fe9c..592422eef 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_lf_deck.nut @@ -2,6 +2,29 @@ global function CodeCallback_MapInit void function CodeCallback_MapInit() { - FlagClear( "Disable_Marvins" ) SetupLiveFireMaps() + + // worker drone model + PrecacheModel( $"models/robots/aerial_unmanned_worker/aerial_unmanned_worker.mdl" ) + + // note: this map has no marvin spawns, have to spawn them using idle nodes + AddSpawnCallback_ScriptName( "worker_drone_spawn", DeckSpawnWorkerDrone ) + AddSpawnCallback_ScriptName( "marvin_idle_node", DeckSpawnMarvinForIdleNode ) +} + +void function DeckSpawnWorkerDrone( entity spawnpoint ) +{ + + entity drone = CreateWorkerDrone( TEAM_UNASSIGNED, spawnpoint.GetOrigin(), spawnpoint.GetAngles() ) + DispatchSpawn( drone ) +} + +void function DeckSpawnMarvinForIdleNode( entity node ) +{ + entity marvin = CreateMarvin( TEAM_UNASSIGNED, node.GetOrigin(), node.GetAngles() ) + DispatchSpawn( marvin ) + + // doing this because no ai rn + if ( GetAINScriptVersion() == -1 ) + thread PlayAnim( marvin, node.kv.leveled_animation ) } \ No newline at end of file -- cgit v1.2.3