1
0
Fork 0

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:
ehofman 2003-05-31 13:38:10 +00:00
parent 948d2bfca6
commit f30f40a2fb

View file

@ -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.)