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:
parent
2c3fa12eea
commit
1100ae47e4
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue