1
0
Fork 0

bfi load/save fix from David.

Added an initial freeze on startup so that we can try to avoid bouncing the
plane on it's back during the very low frame rate / scenery loading startup
conditions.
This commit is contained in:
curt 2000-09-15 19:28:26 +00:00
parent 68d96bfcb1
commit f21847b3c2
2 changed files with 17 additions and 10 deletions

View file

@ -250,15 +250,15 @@ FGBFI::reinit ()
cout << "BFI: start reinit\n";
setHeading(getHeading());
setPitch(getPitch());
setRoll(getRoll());
setSpeedNorth(getSpeedNorth());
setSpeedEast(getSpeedEast());
setSpeedDown(getSpeedDown());
setLatitude(getLatitude());
setLongitude(getLongitude());
setAltitude(getAltitude());
// setHeading(getHeading());
// setPitch(getPitch());
// setRoll(getRoll());
// setSpeedNorth(getSpeedNorth());
// setSpeedEast(getSpeedEast());
// setSpeedDown(getSpeedDown());
// setLatitude(getLatitude());
// setLongitude(getLongitude());
// setAltitude(getAltitude());
// TODO: add more AP stuff
double elevator = getElevator();

View file

@ -130,6 +130,9 @@ FGGeneral general;
static int idle_state = 0;
static int global_multi_loop;
// attempt to avoid a large bounce at startup
static bool initial_freeze = true;
// Another hack
int use_signals = 0;
@ -617,7 +620,7 @@ void fgUpdateTimeDepCalcs(int multi_loop, int remainder) {
multi_loop = 1;
}
if ( !globals->get_freeze() ) {
if ( !globals->get_freeze() && !initial_freeze ) {
// run Autopilot system
current_autopilot->run();
@ -633,6 +636,10 @@ void fgUpdateTimeDepCalcs(int multi_loop, int remainder) {
// fdm_state, 0, remainder );
cur_fdm_state->update( 0 );
FGSteam::update( 0 );
if ( global_tile_mgr.queue_size() == 0 ) {
initial_freeze = false;
}
}
fdm_list.push_back( *cur_fdm_state );