Minor bugfixes

This commit is contained in:
Pax1601
2023-06-13 17:42:18 +02:00
parent 6c24533393
commit feae9a4806
7 changed files with 42 additions and 29 deletions

View File

@@ -58,6 +58,7 @@ void Aircraft::changeAltitude(wstring change)
else if (getDesiredAltitude() >= 0)
setDesiredAltitude(getDesiredAltitude() + ftToM(500));
}
if (getDesiredAltitude() < 0)
setDesiredAltitude(0);

View File

@@ -60,6 +60,9 @@ void Unit::setDefaults(bool force)
/* Set the default IDLE state */
setState(State::IDLE);
/* Set desired altitude to be equal to current altitude so the unit does not climb/descend after spawn */
setDesiredAltitude(altitude);
/* Set the default options (these are all defaults so will only affect the export data, no DCS command will be sent) */
setROE(L"Designated", force);
setReactionToThreat(L"Evade", force);