Minor improvements to the handling of landing gear by the SetGear and HandlePOSI functions

This commit is contained in:
Jason Watkins
2017-06-22 17:02:00 -07:00
parent aa3f7db02e
commit 48656f2b4c
2 changed files with 16 additions and 15 deletions

View File

@@ -629,11 +629,12 @@ namespace XPC
if ((gear < -8.5 && gear > -9.5) || IsDefault(gear))
{
Log::WriteLine(LOG_INFO, "DMAN", "Not actually setting gear because of default value");
return;
}
if (isnan(gear) || gear < 0 || gear > 1)
{
Log::WriteLine(LOG_ERROR, "DMAN", "ERROR: Gear value must be 0 or 1");
Log::WriteLine(LOG_ERROR, "DMAN", "ERROR: Gear value must be between 0 and 1");
return;
}

View File

@@ -572,7 +572,7 @@ namespace XPC
DataManager::SetPosition(pos, aircraftNumber);
DataManager::SetOrientation(orient, aircraftNumber);
if (gear != -1)
if (gear >= 0)
{
DataManager::SetGear(gear, true, aircraftNumber);
}