From 1b484c0800c670f7ba037c9ce34ae3f904d616a8 Mon Sep 17 00:00:00 2001 From: DMagic1 Date: Mon, 31 Dec 2018 10:10:38 -0500 Subject: [PATCH] Update SCANsat.Unity.csproj Revert this change to casting of the SCANtype of enum --- SCANsat/SCANcontroller.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/SCANsat/SCANcontroller.cs b/SCANsat/SCANcontroller.cs index 2b65929cf..0a09e368b 100644 --- a/SCANsat/SCANcontroller.cs +++ b/SCANsat/SCANcontroller.cs @@ -1648,7 +1648,6 @@ private IEnumerator WaitForWaypoint(string s, CelestialBody b) public class SCANsensor { public SCANtype sensor; - public int sensorType; public double fov; public double min_alt, max_alt, best_alt; @@ -1714,7 +1713,7 @@ private void registerSensorTemp(Guid id, SCANtype sensors, double _fov, double _ best_alt = _best_alt, fov = _fov, sensor = sen.sensor | sensorType, - sensorType = (int)sv.sensors[i].sensor, + //sensorType = (int)sv.sensors[i].sensor, }; flag = false; @@ -1732,7 +1731,6 @@ private void registerSensorTemp(Guid id, SCANtype sensors, double _fov, double _ best_alt = _best_alt, fov = _fov, sensor = sensorType, - sensorType = (int)sensorType, }); } } @@ -1819,7 +1817,6 @@ private void registerSensor(Guid id, SCANtype sensors, double _fov, double _min_ best_alt = _best_alt, fov = _fov, sensor = sen.sensor | sensorType, - sensorType = (int)sv.sensors[i].sensor, }; flag = false; @@ -1837,7 +1834,6 @@ private void registerSensor(Guid id, SCANtype sensors, double _fov, double _min_ best_alt = _best_alt, fov = _fov, sensor = sensorType, - sensorType = (int)sensorType, }); } } @@ -2042,6 +2038,7 @@ private void doScanPass(SCANvessel vessel, Vessel v, SCANdata data, double UT, d double res = 0; Orbit o = v.orbit; bool uncovered; + int sensorType; double surfscale = Planetarium.fetch.Home.Radius / v.mainBody.Radius; @@ -2096,6 +2093,8 @@ private void doScanPass(SCANvessel vessel, Vessel v, SCANdata data, double UT, d { SCANsensor sensor = vessel.sensors[j]; + sensorType = (int)sensor.sensor; + if (res <= 0) { if (data.getCoverage(sensor.sensor) > 0) @@ -2185,7 +2184,7 @@ private void doScanPass(SCANvessel vessel, Vessel v, SCANdata data, double UT, d } } - data.coverage[clampLonAgain, clampLat] |= sensor.sensorType; + data.coverage[clampLonAgain, clampLat] |= sensorType; } } //Profiler.EndSample();