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:
parent
91c024ebec
commit
d47eefb00c
2 changed files with 14 additions and 5 deletions
|
@ -677,11 +677,12 @@ void Airplane::compile()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ground effect
|
// Ground effect
|
||||||
|
if(_wing) {
|
||||||
float gepos[3];
|
float gepos[3];
|
||||||
float gespan = 0;
|
float gespan = 0;
|
||||||
if(_wing)
|
|
||||||
gespan = _wing->getGroundEffect(gepos);
|
gespan = _wing->getGroundEffect(gepos);
|
||||||
_model.setGroundEffect(gepos, gespan, 0.15f);
|
_model.setGroundEffect(gepos, gespan, 0.15f);
|
||||||
|
}
|
||||||
|
|
||||||
solveGear();
|
solveGear();
|
||||||
if(_wing && _tail) solve();
|
if(_wing && _tail) solve();
|
||||||
|
|
|
@ -60,6 +60,14 @@ Model::Model()
|
||||||
_ground_cb = new Ground();
|
_ground_cb = new Ground();
|
||||||
_hook = 0;
|
_hook = 0;
|
||||||
_launchbar = 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()
|
Model::~Model()
|
||||||
|
|
Loading…
Add table
Reference in a new issue