#803: apply hotfix to revive "--carrier" option.
This commit is contained in:
parent
39a7caae15
commit
00fe1e3445
1 changed files with 23 additions and 0 deletions
|
@ -1269,6 +1269,29 @@ bool fgInitSubsystems() {
|
||||||
// initialize methods that depend on other subsystems.
|
// initialize methods that depend on other subsystems.
|
||||||
globals->get_subsystem_mgr()->postinit();
|
globals->get_subsystem_mgr()->postinit();
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// TODO FIXME! UGLY KLUDGE!
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
{
|
||||||
|
/* Scenarios require Nasal, so FGAIManager loads the scenarios,
|
||||||
|
* including its models such as a/c carriers, in its 'postinit',
|
||||||
|
* which is the very last thing we do.
|
||||||
|
* fgInitPosition is called very early in main.cxx/fgIdleFunction,
|
||||||
|
* one of the first things we do, long before scenarios/carriers are
|
||||||
|
* loaded. => When requested "initial preset position" relates to a
|
||||||
|
* carrier, recalculate the 'initial' position here (how have things
|
||||||
|
* ever worked before this hack - this init sequence has always been
|
||||||
|
* this way...?)*/
|
||||||
|
std::string carrier = fgGetString("/sim/presets/carrier","");
|
||||||
|
if (carrier != "")
|
||||||
|
{
|
||||||
|
// clear preset location and re-trigger position setup
|
||||||
|
fgSetDouble("/sim/presets/longitude-deg", 9999);
|
||||||
|
fgSetDouble("/sim/presets/latitude-deg", 9999);
|
||||||
|
fgInitPosition();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// End of subsystem initialization.
|
// End of subsystem initialization.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Reference in a new issue