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"; cout << "BFI: start reinit\n";
setHeading(getHeading()); // setHeading(getHeading());
setPitch(getPitch()); // setPitch(getPitch());
setRoll(getRoll()); // setRoll(getRoll());
setSpeedNorth(getSpeedNorth()); // setSpeedNorth(getSpeedNorth());
setSpeedEast(getSpeedEast()); // setSpeedEast(getSpeedEast());
setSpeedDown(getSpeedDown()); // setSpeedDown(getSpeedDown());
setLatitude(getLatitude()); // setLatitude(getLatitude());
setLongitude(getLongitude()); // setLongitude(getLongitude());
setAltitude(getAltitude()); // setAltitude(getAltitude());
// TODO: add more AP stuff // TODO: add more AP stuff
double elevator = getElevator(); double elevator = getElevator();

View file

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