Add not showing lights debug based on other light flags as well.

This commit is contained in:
Chandler Cox
2023-07-07 17:48:16 -05:00
parent a0bb3f2995
commit 0a57cbbecf
2 changed files with 2 additions and 2 deletions

View File

@@ -218,7 +218,7 @@ void SpotLight::OnDebugDrawSelected()
void SpotLight::DrawLightsDebug(RenderView& view)
{
const BoundingSphere sphere(_sphere.Center - view.Origin, _sphere.Radius);
if (!view.CullingFrustum.Intersects(sphere))
if (!view.CullingFrustum.Intersects(sphere) || !EnumHasAnyFlags(view.Flags, ViewFlags::SpotLights))
return;
const auto color = Color::Yellow;