Fix a initialization ordering bug:
Melchior FRANZ: The reason: these models are to be added to the scenery, but the scenery isn't yet set up at this point. The correct order is: - set up model_lib (needed by the scenery) - set up scenery (needed by the model manager) - set up model manager
This commit is contained in:
parent
948d2bfca6
commit
f30f40a2fb
1 changed files with 7 additions and 6 deletions
|
@ -1690,13 +1690,7 @@ static bool fgMainInit( int argc, char **argv ) {
|
|||
////////////////////////////////////////////////////////////////////
|
||||
globals->set_matlib( new SGMaterialLib );
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the general model subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
globals->set_model_lib(new SGModelLib);
|
||||
globals->set_model_mgr(new FGModelMgr);
|
||||
globals->get_model_mgr()->init();
|
||||
globals->get_model_mgr()->bind();
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the TG scenery subsystem.
|
||||
|
@ -1706,6 +1700,13 @@ static bool fgMainInit( int argc, char **argv ) {
|
|||
globals->get_scenery()->bind();
|
||||
globals->set_tile_mgr( new FGTileMgr );
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the general model subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
globals->set_model_mgr(new FGModelMgr);
|
||||
globals->get_model_mgr()->init();
|
||||
globals->get_model_mgr()->bind();
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the 3D aircraft model subsystem (has a dependency on
|
||||
// the scenery subsystem.)
|
||||
|
|
Loading…
Reference in a new issue