1 #insert scripts\shared\shared.gsh;
12 if ( !IsDefined( level.spawn_ai_func ) )
14 level.spawn_ai_func = [];
18 func[
"function" ] = spawn_func;
20 level.spawn_ai_func[ level.spawn_ai_func.size ] = func;
25 if ( !IsDefined( level.spawn_funcs ) )
27 level.spawn_funcs = [];
30 if ( !IsDefined( level.spawn_funcs[archetype] ) )
32 level.spawn_funcs[archetype] = [];
36 func[
"function" ] = spawn_func;
38 ARRAY_ADD( level.spawn_funcs[ archetype ], func );
43 if ( IsDefined( level.spawn_ai_func ) )
45 for ( index = 0; index < level.spawn_ai_func.size; index++ )
47 func = level.spawn_ai_func[ index ];
48 self thread [[ func[
"function" ] ]]( localClientNum );
52 if ( IsDefined( level.spawn_funcs ) && IsDefined( level.spawn_funcs[
self.archetype ] ) )
54 for ( index = 0; index < level.spawn_funcs[
self.archetype ].size; index++ )
56 func = level.spawn_funcs[
self.archetype ][ index ];
58 self thread [[ func[
"function" ] ]]( localClientNum );
74 if(
IS_TRUE( level.clientFieldAICheck ) && !IsArchetypeLoaded( archetype ) )