From 68b2b531bc4e3301f50f55267b5b38521c5074fa Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 1 Sep 2023 23:10:08 +0200 Subject: skip turned off lights --- editor/imgui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 0659719c..00c0c58d 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -251,6 +251,8 @@ void app::do_lightmap_test() if (e_->type() == object_type::light) { const auto& li = static_cast(*e_); + if (li.max_distance < 1e-6f) + continue; light_s L { .center = Vector2(li.coord.local()) * TILE_SIZE2 + Vector2(li.offset), .dist = li.max_distance, -- cgit v1.2.3