1
0
Fork 0

Make it possible for FlightGear to override the fuel tank contents with 0.0

This commit is contained in:
ehofman 2003-06-08 11:19:14 +00:00
parent 1100ae47e4
commit cc0ec0b070

View file

@ -54,7 +54,7 @@ CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
FGTank::FGTank(FGConfigFile* AC_cfg) FGTank::FGTank(FGConfigFile* AC_cfg)
: Contents(0.0) : Contents(-1.0)
{ {
string token; string token;
@ -72,7 +72,7 @@ FGTank::FGTank(FGConfigFile* AC_cfg)
else if (token == "RADIUS") *AC_cfg >> Radius; else if (token == "RADIUS") *AC_cfg >> Radius;
else if (token == "CAPACITY") *AC_cfg >> Capacity; else if (token == "CAPACITY") *AC_cfg >> Capacity;
else if (token == "CONTENTS") { else if (token == "CONTENTS") {
if (Contents == 0.0) *AC_cfg >> Contents; if (Contents == -1.0) *AC_cfg >> Contents;
} else cerr << "Unknown identifier: " << token << " in tank definition." << endl; } else cerr << "Unknown identifier: " << token << " in tank definition." << endl;
} }