summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-01 23:10:08 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-01 23:10:08 +0200
commit68b2b531bc4e3301f50f55267b5b38521c5074fa (patch)
treea447e3d57c2ea563ee7ed15c7cd0a5aeee1a928d /editor
parentcdfd524e1d153f217737c43bbfb6351761dbb760 (diff)
skip turned off lights
Diffstat (limited to 'editor')
-rw-r--r--editor/imgui.cpp2
1 files changed, 2 insertions, 0 deletions
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<const light&>(*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,