1
0
Fork 0

Restored JSBSim to a working state in FlightGear.

This commit is contained in:
Anders Gidenstam 2013-09-23 22:27:51 +02:00
parent 22d91528f8
commit 5a4b9c617c
2 changed files with 6 additions and 4 deletions

View file

@ -807,11 +807,12 @@ void FGFunction::bind(void)
}
if (PropertyManager->HasNode(tmp)) {
FGPropertyNode* property = PropertyManager->GetNode(tmp);
if (property->isTied()) {
cout << "Property " << tmp << " has already been successfully bound (late)." << endl;
} else {
PropertyManager->Tie( tmp, this, &FGFunction::GetValue);
}
}
PropertyManager->Tie( tmp, this, &FGFunction::GetValue);
}
}

View file

@ -676,7 +676,8 @@ void FGPropagate::WriteStateFile(int num)
outfile.close();
break;
default:
throw("When writing a state file, the supplied value must be 1 or 2 for the version number of teh resulting IC file");
return; // Ignore other writes to the property, e.g. on FlightGear reset.
throw("When writing a state file, the supplied value must be 1 or 2 for the version number of the resulting IC file");
}
} else {
cerr << "Could not open and/or write the state to the initial conditions file: " << filename << endl;