From 645eba011b99fa732b5787541e623113be7298fe Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 26 Mar 2024 12:14:45 +0100 Subject: [PATCH] Small tweak. --- modules/vertex_lights_2d/vertex_lights_2d_server.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/vertex_lights_2d/vertex_lights_2d_server.cpp b/modules/vertex_lights_2d/vertex_lights_2d_server.cpp index 6f345190b..4374a99a0 100644 --- a/modules/vertex_lights_2d/vertex_lights_2d_server.cpp +++ b/modules/vertex_lights_2d/vertex_lights_2d_server.cpp @@ -139,6 +139,10 @@ bool VertexLights2DServer::light_get_is_enabled(RID p_light) { void VertexLights2DServer::light_set_enabled(RID p_light, const bool p_enabled) { VertexLightData2D *light = light_owner.getornull(p_light); ERR_FAIL_COND(light == NULL); + + if (light->enabled == p_enabled) { + return; + } light->enabled = p_enabled;