print("Loading multiplayer railyard Setting")


clear();

--LEVEL SETUP

--set Background
--texture, width, height, position X, position Y
setBackGround("map_railyard.dds", 400, 200, 0, 0);
setTerrainMap("terraininfo_railyard.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(-135, 70);
wp1 = addWaypoint(-135, 30);
wp2 = addWaypoint(-135, -36);
wp3 = addWaypoint(-61, -38);
wp4 = addWaypoint(-4, -23);
wp5 = addWaypoint(49, -22);
wp6 = addWaypoint(131, -19);
wp7 = addWaypoint(112, 38);
wp8 = addWaypoint(11, 76);
wpx1 = addWaypointEX(139, -73, wp6, wp6);


--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, 80, 10, -78, 53.7, PI * -0.00);
addObstacleBox(map_Building, 160, 10, 9, 17, PI * -0.00);
addObstacleBox(map_Building, 80, 10, 64.5, -46.5, PI * -0.00);

addObstacleBox(map_Building, 60, 55, -197.5, 8.5, PI * -0.02);

--misc Mobs
--texture, size X, size Y, position X, position Y, mass, elastic, friction, round, dir 
addGroundMob(map_tireutil,    4,      4,      -194,     -27,      6,      0.9,   0.1,    true, 0.1);
addGroundMob(map_tireold,     3,      3,      -82,     -36,      6,      0.9,   0.1,    true, 0.2);

--texture, size X, size Y, position X, position Y, mass, elastic, friction, round, dir
addGroundMobq(map_barrelblue, 3, 5, -163, 41, 2, 0.9, 0.1, false, 0.5);

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

ndc();



