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) {
|
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue