CSceneNode: Make use of structured bindings in RayAABoxIntersectTest()

Same thing, but lets the returned values have more self-explanatory
names.
This commit is contained in:
Lioncache
2025-12-06 18:31:32 -05:00
parent 4914ccdc22
commit 25c45b2b28

View File

@@ -39,10 +39,10 @@ void CSceneNode::DrawSelection()
void CSceneNode::RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& /*rkViewInfo*/) void CSceneNode::RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& /*rkViewInfo*/)
{ {
// Default implementation for virtual function // Default implementation for virtual function
std::pair<bool,float> Result = AABox().IntersectsRay(rTester.Ray()); const auto [hit, distance] = AABox().IntersectsRay(rTester.Ray());
if (Result.first) if (hit)
rTester.AddNode(this, -1, Result.second); rTester.AddNode(this, -1, distance);
} }
bool CSceneNode::IsVisible() const bool CSceneNode::IsVisible() const