print("Loading Crosstrain Setting")


clear();

--LEVEL SETUP

--set Background
--texture, width, height, position X, position Y
setBackGround("map_crosstrain.dds", 400, 200, 0, 0);
setTerrainMap("terraininfo_crosstrain.tga");
setGameMode(3);
gofile("multiplayer/netViewDistance.lua");


--set Sun
--distance X, distance Y
setSunDist(-0.55, 1.0);

--set Dust visual element
setDustElement(vel_dust);
setSkidElement(vel_skid);

--set Borders
--position X, position Y, direction, elasticity
addBorder(0, 100, PI, 0.7);
addBorder(200, 0, HALFPI, 0.7);
addBorder(0, -100, 0, 0.7);
addBorder(-200, 0, THREEHALFPI, 0.7);

--setWaypoints
--position X, position Y
addWaypoint(-40, 43);
addWaypoint(60, 60);
addWaypoint(150, -5);
addWaypoint(150, -65);
addWaypoint(57, -70);
addWaypoint(-45, -65);
addWaypoint(-54, -7);

--set Camera Extents
--max X, min X, max Y, min Y
--setCameraExtents(150.0, -150.0, 62.5, -62.5);
autoCameraExtents();

--set Obstacles
--texture, size X, size Y, position X, position Y, direction 
addObstacleBox(map_Building, 113, 14, 47, -41, 0.00);
addObstacleBox(map_Building, 65, 18, 9, 24, PI * 0.01);

--setup enemy spawn points
spawn1_X = 60;
spawn1_Y = -220;
spawn2_X = -60;
spawn2_Y = 220;
spawn3_X = 60;
spawn3_Y = -220;
spawn4_X = 60;
spawn4_Y = -220;


ballmob = addGroundMobq(map_barrelsoccer, 3, 5, 0, -4, 2, 0.9, 0.1, false, 0.5);

netSetTeamSpawn00(-58, 11, 1.26 * PI);
netSetTeamSpawn01(-56, -33, 1.65 * PI);
netSetTeamSpawn10(57, 26, 0.7 * PI);
netSetTeamSpawn11(63, -28, 0.45 * PI);

netSetGoal0(35, 12, 185, 30, 1.5 * PI);
netSetGoal1(35, 12, -185, 20, 0.5 * PI);
netSetKickOff(0,-4);
netSetBallMob(ballmob);

ndc();


