]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/hitlist.hxx
Updates to allow weather system and atis to interact better.
[flightgear.git] / src / Scenery / hitlist.hxx
index 709b23a205fb106b12b8d05f12aa986781561647..b734897002d389897b816150911179c4e9ec69da 100644 (file)
@@ -80,17 +80,23 @@ inline void FGHitList::Intersect( ssgBranch *scene,
 {
     sgdMat4 m;
 
+#ifdef USE_CACHED_HIT
+       // This optimization gives a slight speedup
+       // but it precludes using the hitlist for dynamic
+       // objects  NHV
     init();
-
     if( last_hit() ) {
        sgdMakeIdentMat4 ( m ) ;
        IntersectCachedLeaf(m, orig, dir);
     }
     if( ! num_hits() ) {
+#endif
        clear();
        sgdMakeIdentMat4 ( m ) ;
        IntersectBranch( scene, m, orig, dir);
+#ifdef USE_CACHED_HIT
     }
+#endif
 }