1
0
Fork 0

Fix a potential crash with William Riley's scenery build.

This commit is contained in:
curt 2002-10-09 14:29:42 +00:00
parent 257c065d81
commit 83314d3f45
3 changed files with 9 additions and 3 deletions

View file

@ -252,6 +252,7 @@ bool FGMaterialLib::load( const string& mpath ) {
matlib["RWY_WHITE_LIGHTS"] = new FGNewMat(rwy_white_lights);
// For backwards compatibility ... remove someday
matlib["RUNWAY_LIGHTS"] = new FGNewMat(rwy_white_lights);
matlib["RWY_LIGHTS"] = new FGNewMat(rwy_white_lights);
// end of backwards compatitibilty
// hard coded runway vasi light state

View file

@ -101,8 +101,13 @@ ssgLeaf *gen_directional_light( sgVec3 pt, sgVec3 dir, sgVec3 up,
new ssgVtxTable ( GL_TRIANGLES, vl, nl, NULL, cl );
FGNewMat *newmat = material_lib.find( material );
// FGNewMat *newmat = material_lib.find( "IrrCropPastureCover" );
leaf->setState( newmat->get_state() );
if ( newmat != NULL ) {
leaf->setState( newmat->get_state() );
} else {
SG_LOG( SG_TERRAIN, SG_ALERT, "Warning: can't material = "
<< material );
}
return leaf;
}

View file

@ -1348,7 +1348,7 @@ FGTileEntry::load( const SGPath& base, bool is_base )
// Add runway lights to scene graph if any exist
if ( rwy_lights_range->getNumKids() > 0 ) {
SG_LOG( SG_TERRAIN, SG_INFO, "adding runway lights" );
SG_LOG( SG_TERRAIN, SG_DEBUG, "adding runway lights" );
rwy_lights_transform->addKid( rwy_lights_range );
rwy_lights_transform->setTransform( &sgcoord );
}