mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-03 17:39:36 +01:00
Don't emit changed signal for disabled lights.
This commit is contained in:
parent
76c5252239
commit
34603315e4
@ -162,7 +162,7 @@ void VertexLights2DServer::light_set_enabled(RID p_light, const bool p_enabled)
|
|||||||
|
|
||||||
light->enabled = p_enabled;
|
light->enabled = p_enabled;
|
||||||
|
|
||||||
_light_changed(light);
|
_light_enabled_changed(light);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 VertexLights2DServer::light_get_position(RID p_light) {
|
Vector2 VertexLights2DServer::light_get_position(RID p_light) {
|
||||||
|
@ -215,6 +215,12 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
_FORCE_INLINE_ void _light_changed(const VertexLightData2D *p_light) const {
|
_FORCE_INLINE_ void _light_changed(const VertexLightData2D *p_light) const {
|
||||||
|
if (p_light && p_light->enabled && p_light->map) {
|
||||||
|
_changed_maps.insert(p_light->map->self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_FORCE_INLINE_ void _light_enabled_changed(const VertexLightData2D *p_light) const {
|
||||||
if (p_light && p_light->map) {
|
if (p_light && p_light->map) {
|
||||||
_changed_maps.insert(p_light->map->self);
|
_changed_maps.insert(p_light->map->self);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user