summaryrefslogtreecommitdiffstats
path: root/scene/3d/light.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-10-30 09:00:45 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-10-30 09:00:45 -0300
commitab4126f51061277e87b41c48b40e7b54942d4eca (patch)
treec58168b60323c4d43b58743b099e562a89e60a56 /scene/3d/light.cpp
parent8b15b26eedad4fdd33d50f5f9aa0fcc1875d503f (diff)
parent914015f3b63dd956e72ea937d46ea4b2db005ada (diff)
downloadredot-engine-ab4126f51061277e87b41c48b40e7b54942d4eca.tar.gz
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'scene/3d/light.cpp')
-rw-r--r--scene/3d/light.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 227bb3a59d..5b221d1574 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -446,6 +446,10 @@ bool editor_ok=true;
editor_ok = (get_tree()->get_edited_scene_root() && (this==get_tree()->get_edited_scene_root() || get_owner()==get_tree()->get_edited_scene_root()));
}
}
+#else
+ if (editor_only) {
+ editor_ok=false;
+ }
#endif
VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible() && enabled && editor_ok);
@@ -672,5 +676,3 @@ void SpotLight::_bind_methods() {
ADD_PROPERTYI( PropertyInfo( Variant::REAL, "params/spot_attenuation", PROPERTY_HINT_EXP_EASING, "spot_attenuation"), _SCS("set_parameter"), _SCS("get_parameter"), PARAM_SPOT_ATTENUATION );
}
-
-