2021-04-04 09:20:03 -07:00
#include common_scripts\utility;
2023-02-05 11:46:36 -08:00
2021-04-04 09:20:03 -07:00
main()
{
2023-02-05 11:46:36 -08:00
maps\mp\_load::main();
2021-04-04 09:20:03 -07:00
2023-02-05 11:46:36 -08:00
game[ "attackers" ] = "allies";
game[ "defenders" ] = "axis";
2021-04-04 09:20:03 -07:00
2023-02-05 11:46:36 -08:00
maps\mp\_compass::setupMiniMap( "compass_map_hunted" );
setdvar( "compassmaxrange", "4000" );
2021-04-04 09:20:03 -07:00
2023-02-05 11:46:36 -08:00
array_thread( getentarray( "compassTriggers", "targetname" ), ::compass_triggers_think );
2021-04-04 09:20:03 -07:00
}
2023-02-05 11:46:36 -08:00
2021-04-04 09:20:03 -07:00
self_delete()
{
2023-02-05 11:46:36 -08:00
self delete();
2021-04-04 09:20:03 -07:00
}
compass_triggers_think()
{
2023-02-05 11:46:36 -08:00
assertex( isdefined( self.script_noteworthy ), "compassTrigger at " + self.origin + " needs to have a script_noteworthy with the name of the minimap to use" );
while ( true )
{
wait( 1 );
self waittill( "trigger" );
maps\mp\_compass::setupMiniMap( self.script_noteworthy );
}
2021-04-04 09:20:03 -07:00
}
2023-02-05 11:46:36 -08:00
2021-04-04 09:20:03 -07:00
createSpawnpoint( classname, origin, yaw )
{
2023-02-05 11:46:36 -08:00
spawnpoint = spawn( "script_origin", origin );
spawnpoint.angles = ( 0, yaw, 0 );
if ( !isdefined( level.extraspawnpoints ) )
level.extraspawnpoints = [];
if ( !isdefined( level.extraspawnpoints[classname] ) )
level.extraspawnpoints[classname] = [];
level.extraspawnpoints[classname][ level.extraspawnpoints[classname].size ] = spawnpoint;
}