1
0
Fork 0

Move dynamic_casts to EffectGeode into the findMaterial method.

Modified Files:
	src/Scenery/scenery.cxx
This commit is contained in:
frohlich 2009-09-07 20:40:08 +00:00 committed by Tim Moore
parent 690231ff64
commit 5c56757303

View file

@ -169,13 +169,8 @@ FGScenery::get_elevation_m(const SGGeod& geod, double& alt,
if (alt < elevation) { if (alt < elevation) {
alt = elevation; alt = elevation;
hits = true; hits = true;
if (material) { if (material)
*material = 0; *material = SGMaterialLib::findMaterial(hit.getGeode());
const EffectGeode* eg
= dynamic_cast<const EffectGeode*>(hit.getGeode());
if (eg)
*material = SGMaterialLib::findMaterial(eg->getEffect());
}
} }
} }
} }