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("setViewDistance.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;


--setup Player: Car, audio listener, and camera follow
player = addBeing(playerCar, -55.0, -22.0, -PI * 0.15, 1);
setPlayerBeing(player);
setMobHealth(player, getPlayerHealth());

setWeapon(player, 1, playerWeapon1);
setWeapon(player, 2, playerWeapon2);



