I found an error in the main function when initializing the aircraft model,
look :
/******** this get the full path to the ac model ********/
i) string acmodel_path =
ii) fgGetString("/sim/model/path", "Models/Geometry/glider.ac" );
iii) SGPath full_model = globals->get_fg_root();
iv) full_model.append(acmodel_path);
v) #if !defined( PLIB_1_2_X )
vi) // this should be redundant ... but it breaks for relative paths
vii) // ssgModelPath( (char *)full_model.dir().c_str() );
viii) #endif
/******** This line set the path to the textures, right? ********/
ix) ssgTexturePath( (char *)full_model.dir().c_str() );
/******** If it's right, why pass just the path to load the ac file???
********/
x) ssgEntity *acmodel_obj = ssgLoad( (char *)full_model.dir().c_str() );
/******** then, ssgLoad doesn't find any file and return NULL ********/
xi) if( !acmodel_obj ) {
// fall back to default
/******** and load the default ********/
xii) acmodel_obj = ssgLoad( (char *)"Models/Geometry/glider.ac" );
xiii) if( !acmodel_obj ) {
xiv) SG_LOG( SG_GENERAL, SG_ALERT, "FAILED to LOAD an AC model!
..." );
xv) exit(-1);
}
}
/******** so, doesn't matters what you pass in ii, it always load the
default model!!! ********/
I think to correct this, it's simple, just change the line x to:
ssgEntity *acmodel_obj = ssgLoad( acmodel_path.c_str() );
then if you pass an valid path to an aircraft in line ii, FG loads the
correct model.
[]'s
Marcio Shimoda
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel