1
0
Fork 0

fix bug that prevented /sim/sceneryloaded from ever becoming "true" if

/sim/screneryloaded-override was "true". At least one subsystem (od_gauge)
waits for /sim/sceneryloaded to bypass CPU intensive code until the scenery
is up. This broke e.g. the RTT-radar when using /sim/screneryloaded-override

--prop:sim/sceneryloaded-override=true has the effect that fgfs
doesn't show the splash screen until the scenery is loaded, but shows
the OTW view (scenery/aircraft) at the earliest possible moment. This is
useful for developers who often need to run fgfs only to check some minor
detail, while not caring about stuttering caused by scenery loading.
This commit is contained in:
mfranz 2007-06-19 10:18:14 +00:00
parent 588ce7e470
commit 5123de61ee

View file

@ -219,7 +219,8 @@ static void fgMainLoop( void ) {
SGCloudLayer::enable_bump_mapping = fgGetBool("/sim/rendering/bump-mapping");
bool scenery_loaded = fgGetBool("sim/sceneryloaded") || fgGetBool("sim/sceneryloaded-override");
bool scenery_loaded = fgGetBool("sim/sceneryloaded");
bool wait_for_scenery = !(scenery_loaded || fgGetBool("sim/sceneryloaded-override"));
// Update the elapsed time.
static bool first_time = true;
@ -229,7 +230,7 @@ static void fgMainLoop( void ) {
}
double throttle_hz = fgGetDouble("/sim/frame-rate-throttle-hz", 0.0);
if ( throttle_hz > 0.0 && scenery_loaded ) {
if ( throttle_hz > 0.0 && !wait_for_scenery ) {
// optionally throttle the frame rate (to get consistent frame
// rates or reduce cpu usage.
@ -314,7 +315,7 @@ static void fgMainLoop( void ) {
}
if (clock_freeze->getBoolValue() || !scenery_loaded) {
if (clock_freeze->getBoolValue() || wait_for_scenery) {
delta_time_sec = 0;
} else {
delta_time_sec = real_delta_time_sec;