Fix starting on carrier.
- scenery intersection needs to check the whole scene since carriers are outside it. (could possibly be optimised further)
This commit is contained in:
parent
88b7d4f530
commit
2beb0f29af
1 changed files with 3 additions and 3 deletions
|
@ -384,7 +384,7 @@ FGScenery::get_elevation_m(const SGGeod& geod, double& alt,
|
||||||
|
|
||||||
FGSceneryIntersect intersectVisitor(SGLineSegmentd(start, end), butNotFrom);
|
FGSceneryIntersect intersectVisitor(SGLineSegmentd(start, end), butNotFrom);
|
||||||
intersectVisitor.setTraversalMask(SG_NODEMASK_TERRAIN_BIT);
|
intersectVisitor.setTraversalMask(SG_NODEMASK_TERRAIN_BIT);
|
||||||
terrain_branch->accept(intersectVisitor);
|
get_scene_graph()->accept(intersectVisitor);
|
||||||
|
|
||||||
if (!intersectVisitor.getHaveHit())
|
if (!intersectVisitor.getHaveHit())
|
||||||
return false;
|
return false;
|
||||||
|
@ -413,7 +413,7 @@ FGScenery::get_cart_ground_intersection(const SGVec3d& pos, const SGVec3d& dir,
|
||||||
|
|
||||||
FGSceneryIntersect intersectVisitor(SGLineSegmentd(start, end), butNotFrom);
|
FGSceneryIntersect intersectVisitor(SGLineSegmentd(start, end), butNotFrom);
|
||||||
intersectVisitor.setTraversalMask(SG_NODEMASK_TERRAIN_BIT);
|
intersectVisitor.setTraversalMask(SG_NODEMASK_TERRAIN_BIT);
|
||||||
terrain_branch->accept(intersectVisitor);
|
get_scene_graph()->accept(intersectVisitor);
|
||||||
|
|
||||||
if (!intersectVisitor.getHaveHit())
|
if (!intersectVisitor.getHaveHit())
|
||||||
return false;
|
return false;
|
||||||
|
@ -436,7 +436,7 @@ bool FGScenery::scenery_available(const SGGeod& position, double range_m)
|
||||||
// currently the PagedLODs will not be loaded by the DatabasePager
|
// currently the PagedLODs will not be loaded by the DatabasePager
|
||||||
// while the splashscreen is there, so CheckSceneryVisitor force-loads
|
// while the splashscreen is there, so CheckSceneryVisitor force-loads
|
||||||
// missing objects in the main thread
|
// missing objects in the main thread
|
||||||
terrain_branch->accept(csnv);
|
get_scene_graph()->accept(csnv);
|
||||||
if(!csnv.isLoaded())
|
if(!csnv.isLoaded())
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue