Skip to content

Commit

Permalink
Update SCANsat.Unity.csproj
Browse files Browse the repository at this point in the history
Revert this change to casting of the SCANtype of enum
  • Loading branch information
DMagic1 committed Dec 31, 2018
1 parent f2b5fdd commit 1b484c0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions SCANsat/SCANcontroller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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,
});
}
}
Expand Down Expand Up @@ -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;
Expand All @@ -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,
});
}
}
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1b484c0

Please sign in to comment.