#include <Main/globals.hxx>
#include <Main/viewer.hxx>
+#include <Scenery/scenery.hxx>
#include "hitlist.hxx"
kid != NULL;
kid = branch->getNextKid() )
{
- if ( kid->getTraversalMask() & SSGTRAV_HOT )
+ if ( kid->getTraversalMask() & SSGTRAV_HOT
+ && !kid->getBSphere()->isEmpty() )
{
sgdVec3 center;
sgdSetVec3( center,
sgdCopyVec3(orig, view_pos );
sgdCopyVec3(dir, abs_view_pos );
- hit_list->Intersect( globals->get_terrain_branch(), orig, dir );
+ hit_list->Intersect( globals->get_scenery()->get_terrain_branch(),
+ orig, dir );
int this_hit=0;
Point3D geoc;