Move dynamic_casts to EffectGeode into the findMaterial method.
Modified Files: src/Scenery/scenery.cxx
This commit is contained in:
parent
690231ff64
commit
5c56757303
1 changed files with 2 additions and 7 deletions
|
@ -169,13 +169,8 @@ FGScenery::get_elevation_m(const SGGeod& geod, double& alt,
|
|||
if (alt < elevation) {
|
||||
alt = elevation;
|
||||
hits = true;
|
||||
if (material) {
|
||||
*material = 0;
|
||||
const EffectGeode* eg
|
||||
= dynamic_cast<const EffectGeode*>(hit.getGeode());
|
||||
if (eg)
|
||||
*material = SGMaterialLib::findMaterial(eg->getEffect());
|
||||
}
|
||||
if (material)
|
||||
*material = SGMaterialLib::findMaterial(hit.getGeode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue