Can't assume that the aircraft has a fuel tank.
This commit is contained in:
parent
a0e00e1eaf
commit
5ea9821329
1 changed files with 4 additions and 1 deletions
|
@ -565,7 +565,10 @@ void FGFDM::setOutputProperties(float dt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float fuelDensity = _airplane.getFuelDensity(0); // HACK
|
// Use the density of the first tank, or a dummy value if no tanks
|
||||||
|
float fuelDensity = 1.0;
|
||||||
|
if(_airplane.numTanks())
|
||||||
|
fuelDensity = _airplane.getFuelDensity(0);
|
||||||
for(i=0; i<_thrusters.size(); i++) {
|
for(i=0; i<_thrusters.size(); i++) {
|
||||||
EngRec* er = (EngRec*)_thrusters.get(i);
|
EngRec* er = (EngRec*)_thrusters.get(i);
|
||||||
Thruster* t = er->eng;
|
Thruster* t = er->eng;
|
||||||
|
|
Loading…
Reference in a new issue