Minor bugfixes

This commit is contained in:
Pax1601
2023-03-26 18:04:17 +02:00
parent 658efe3daf
commit 911a81169b
5 changed files with 8 additions and 7 deletions

View File

@@ -63,11 +63,13 @@ void Aircraft::changeAltitude(wstring change)
void Aircraft::setTargetSpeed(double newTargetSpeed) {
targetSpeed = newTargetSpeed;
addMeasure(L"targetSpeed", json::value(targetSpeed));
goToDestination();
if (activeDestination != NULL)
goToDestination();
}
void Aircraft::setTargetAltitude(double newTargetAltitude) {
targetAltitude = newTargetAltitude;
addMeasure(L"targetAltitude", json::value(targetAltitude));
goToDestination();
if (activeDestination != NULL)
goToDestination();
}

View File

@@ -149,7 +149,7 @@ bool AirUnit::updateActivePath(bool looping)
/* Push the next destination in the queue to the front */
if (looping)
pushActivePathBack(activePath.front());
activePath.pop_front();
popActivePathFront();
log(unitName + L" active path front popped");
return true;
}

View File

@@ -201,7 +201,6 @@ void Unit::popActivePathFront()
setActivePath(path);
}
void Unit::setCoalitionID(int newCoalitionID)
{
if (newCoalitionID == 0)