print("Loading mine setting")


clear();

--LEVEL SETUP

--set Background
--texture, width, height, position X, position Y
setBackGround("map_mine.dds", 400, 200, 0, 0);
setTerrainMap("terraininfo_mine.tga");
setGameMode(1);
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(-145, -11);
addWaypoint(-165, -66);
addWaypoint(-94, -70);
addWaypoint(5, -70);
addWaypoint(100, -68);
addWaypoint(155, -65);
addWaypoint(148, 3);
addWaypoint(53, 12);
addWaypoint(0, 0);
addWaypoint(-63, 15);
addWaypoint(-100, 17);





--set Camera Extents
autoCameraExtents();

--set Obstacles
--texture, size X, size Y, position X, position Y, direction 
addObstacleBox(map_Building, 66, 33, -96.5, -25.5, PI * 0.013);
addObstacleBox(map_Building, 66, 32, 92, -25.5, PI * -0.018);

addObstacleBox(map_Building, 120, 40, -150, 80, PI * 0.078);
addObstacleBox(map_Building, 60, 40, -100, 88, PI * 0.00);
addObstacleBox(map_Building, 100, 40, -50, 77, PI * -0.078);
addObstacleBox(map_Building, 100, 40, 35, 75.5, PI * 0.078);
addObstacleBox(map_Building, 60, 40, 80, 85, PI * 0.00);
addObstacleBox(map_Building, 80, 40, 118, 81, PI * -0.060);
addObstacleBox(map_Building, 80, 40, 180, 90, PI * 0.15);

addObstacleBox(map_Building, 62, 35, -11, 45, PI * -0.060);
addObstacleBox(map_Building, 40, 15, -49.5, 55, PI * -0.300);

--addObstacleSprite(map_PropFighter, 2.8, 22, 0, -25.5, PI * -0.00, 30, 25);

--addTopSprite(map_PropFighter, 30, 25, 33, -25.5, PI * -0.20);




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

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

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



