Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WaypointManager.ChooseRandomPosition(out centerLatitude, out centerLongitude, targetBody.GetName(), true, false);
- if (this.prestige == Contract.ContractPrestige.Trivial)
- {
- waypointCount = 1;
- waypointCount += additionalWaypoints;
- range = 100000.0;
- if (targetBody.GetName() == "Kerbin") {
- // Old Airfield island flights
- minAltitude = 500.0;
- maxAltitude = 3500.0;
- range = 20000.0;
- centerLatitude = -2;
- centerLongitude = -72.5;
- }
- }
- else if (this.prestige == Contract.ContractPrestige.Significant)
- {
- waypointCount = 1;
- waypointCount += additionalWaypoints;
- range = 200000.0;
- if (targetBody.GetName() == "Kerbin") {
- // Mountain flights
- minAltitude = 2000.0;
- maxAltitude = 8000.0;
- range = 30000.0;
- centerLatitude = 1;
- centerLongitude = -79;
- }
- }
- else if (this.prestige == Contract.ContractPrestige.Exceptional)
- {
- waypointCount = 1;
- waypointCount += additionalWaypoints;
- range = 300000.0;
- if (targetBody.GetName() == "Kerbin") {
- // High altitude flights
- minAltitude = 8000.0;
- maxAltitude = 20000.0;
- range = 50000.0;
- centerLatitude = -3.5;
- centerLongitude = -85.5;
- }
- }
- double altitudeHalfQuarterRange = Math.Abs(maxAltitude - minAltitude) * 0.125;
- double upperMidAltitude = ((maxAltitude + minAltitude) / 2.0) + altitudeHalfQuarterRange;
- double lowerMidAltitude = ((maxAltitude + minAltitude) / 2.0) - altitudeHalfQuarterRange;
- minAltitude = Math.Round((minAltitude + (generator.NextDouble() * (lowerMidAltitude - minAltitude))) / 100.0) * 100.0;
- maxAltitude = Math.Round((upperMidAltitude + (generator.NextDouble() * (maxAltitude - upperMidAltitude))) / 100.0) * 100.0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement