aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_grave.nut
blob: 73059b9e3410e652f3a96281bc108174b33e13f3 (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
global function CodeCallback_MapInit

void function CodeCallback_MapInit()
{
	// there are some really busted titan startspawns that are on the fucking other side of the map from where they should be, so we remove them
	AddSpawnCallback( "info_spawnpoint_titan_start", TrimBadTitanStartSpawns )
	
	// Load Frontier Defense Data
	if(GameRules_GetGameMode()=="fd")
		initFrontierDefenseData()

}

void function TrimBadTitanStartSpawns( entity spawn )
{
	vector comparisonOrigin
	if ( spawn.GetTeam() == TEAM_IMC )
		comparisonOrigin = < -2144, -4944, 1999.7 >
	else
		comparisonOrigin = < 11026.8, -5163.18, 1885.64 >

	if ( Distance2D( spawn.GetOrigin(), comparisonOrigin ) >= 2000.0 )
		spawn.Destroy()
}