print("Loading multiplayer ghosttown setting")


clear();

--LEVEL SETUP

--set Background
--texture, width, height, position X, position Y
setBackGround("map_ghosttown.dds", 400, 200, 0, 0);
setTerrainMap("terraininfo_ghosttown.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
wp0 = addWaypoint(-82, 29);
wp1 = addWaypoint(-13.5, 56);
wp2 = addWaypoint(6, 81);
wp3 = addWaypoint(66, 60);
wp4 = addWaypoint(110, 1);
wp5 = addWaypoint(78, -55);
wp6 = addWaypoint(-9, -59);
wp7 = addWaypoint(-103, -42);
wp8 = addWaypoint(-115, 4);
wpx1 = addWaypointEX(-173, 2, wp8, wp8);
wpx2 = addWaypointEX(167, 2, wp4, wp4);


--set Camera Extents
autoCameraExtents();

--set Obstacles
--texture, size X, size Y, position X, position Y, direction 
--building
addObstacleBox(map_Building, 64.7, 17.7, -125.23, 50.35, PI * 0.0175);

addObstacleBox(map_Building, 45.0, 22.8, -48.346, 2.575, PI * 2.00);
addObstacleBox(map_Building, 14.2, 9.6, -21.82, -2.086, PI * 2.00);
addObstacleBox(map_Building, 51.9, 25.1, 7.606, -3.658, PI * 1.985);
addObstacleBox(map_Building, 17.5, 18.8, 40.58079, -6.403, PI * 1.9859);
addObstacleBox(map_Building, 23.8, 22.7, 58.806362, -2.199, PI * 1.9976);

addObstacleBox(map_Building, 7.7, 23.9, 136.051086, -59.3833, PI * 1.936);
addObstacleBox(map_Building, 9.1, 25.3, 134.6627, -58.862473, PI * 0.196556);






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

ndc();



