Fix a crash that sometimes occurred when reporting downwind in the circuit
This commit is contained in:
parent
406c7d7042
commit
f8ef6d16b4
1 changed files with 8 additions and 3 deletions
|
@ -2036,11 +2036,16 @@ void FGTower::ReportDownwind(string ID) {
|
||||||
// the moment that would b&gg?r up the constraint position calculations.
|
// the moment that would b&gg?r up the constraint position calculations.
|
||||||
RemoveFromAppList(ID);
|
RemoveFromAppList(ID);
|
||||||
t->leg = DOWNWIND;
|
t->leg = DOWNWIND;
|
||||||
t->pos = t->planePtr->GetPos();
|
if(t->isUser) {
|
||||||
|
t->pos.setlon(user_lon_node->getDoubleValue());
|
||||||
|
t->pos.setlat(user_lat_node->getDoubleValue());
|
||||||
|
t->pos.setelev(user_elev_node->getDoubleValue());
|
||||||
|
} else {
|
||||||
|
// ASSERT(t->planePtr != NULL);
|
||||||
|
t->pos = t->planePtr->GetPos();
|
||||||
|
}
|
||||||
CalcETA(t);
|
CalcETA(t);
|
||||||
//cout << "DDDDDDDDDDDDDDDDdddddddd" << endl;
|
|
||||||
AddToCircuitList(t);
|
AddToCircuitList(t);
|
||||||
//cout << "EEEEEEEEEEEEEEEEEEEEeeeeee" << endl;
|
|
||||||
} else {
|
} else {
|
||||||
SG_LOG(SG_ATC, SG_WARN, "WARNING: Unable to find plane " << ID << " in FGTower::ReportDownwind(...)");
|
SG_LOG(SG_ATC, SG_WARN, "WARNING: Unable to find plane " << ID << " in FGTower::ReportDownwind(...)");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue