blob: 592422eefd396f5f6158f2660f4695fc952e8d5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
global function CodeCallback_MapInit
void function CodeCallback_MapInit()
{
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 )
}
|