1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Prevent negative zero shown in SpotLight gizmo

This commit is contained in:
Haoyu Qiu
2020-01-20 09:08:18 +08:00
parent adb6734b49
commit ce9453ecf4

View File

@@ -885,7 +885,7 @@ void LightSpatialGizmoPlugin::set_handle(EditorSpatialGizmo *p_gizmo, int p_idx,
d = Math::stepify(d, SpatialEditor::get_singleton()->get_translate_snap()); d = Math::stepify(d, SpatialEditor::get_singleton()->get_translate_snap());
} }
if (d < 0) if (d <= 0) // Equal is here for negative zero.
d = 0; d = 0;
light->set_param(Light::PARAM_RANGE, d); light->set_param(Light::PARAM_RANGE, d);