1
0
Fork 0

Fix a problem where the contents could be specified by JSBSim and by FlightGear, where JSBSim would override the FlightGear specified value. Now the JSBSim specified value will be discarded if Contents is already set.

This commit is contained in:
ehofman 2003-06-08 08:45:07 +00:00
parent 2c3fa12eea
commit 1100ae47e4

View file

@ -54,6 +54,7 @@ CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
FGTank::FGTank(FGConfigFile* AC_cfg)
: Contents(0.0)
{
string token;
@ -70,8 +71,9 @@ FGTank::FGTank(FGConfigFile* AC_cfg)
else if (token == "ZLOC") *AC_cfg >> Z;
else if (token == "RADIUS") *AC_cfg >> Radius;
else if (token == "CAPACITY") *AC_cfg >> Capacity;
else if (token == "CONTENTS") *AC_cfg >> Contents;
else cerr << "Unknown identifier: " << token << " in tank definition." << endl;
else if (token == "CONTENTS") {
if (Contents == 0.0) *AC_cfg >> Contents;
} else cerr << "Unknown identifier: " << token << " in tank definition." << endl;
}
Selected = true;