1
0
Fork 0

Fix an uninitialized data condition that crept in during the recent

groundcache addition -- the ground callback doesn't do anything at
solution time, so the ground plane was unset.  Valgrind was whining
about this; it's not clear that it was actually causing a problem.
This commit is contained in:
andy 2006-03-10 19:47:23 +00:00
parent 91c024ebec
commit d47eefb00c
2 changed files with 14 additions and 5 deletions

View file

@ -677,11 +677,12 @@ void Airplane::compile()
}
// Ground effect
if(_wing) {
float gepos[3];
float gespan = 0;
if(_wing)
gespan = _wing->getGroundEffect(gepos);
_model.setGroundEffect(gepos, gespan, 0.15f);
}
solveGear();
if(_wing && _tail) solve();

View file

@ -60,6 +60,14 @@ Model::Model()
_ground_cb = new Ground();
_hook = 0;
_launchbar = 0;
_groundEffectSpan = 0;
_groundEffect = 0;
for(i=0; i<3; i++) _wingCenter[i] = 0;
_global_ground[0] = 0; _global_ground[1] = 0; _global_ground[2] = 1;
_global_ground[3] = -100000;
}
Model::~Model()