diff options
Diffstat (limited to 'scene/3d/light.cpp')
-rw-r--r-- | scene/3d/light.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 1566743e1b..7a0db6c174 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -5,7 +5,7 @@ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -158,6 +158,10 @@ void Light::_update_visibility() { 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() && editor_ok); @@ -422,5 +426,3 @@ void SpotLight::_bind_methods() { ADD_PROPERTYI( PropertyInfo( Variant::REAL, "spot/spot_attenuation",PROPERTY_HINT_EXP_EASING), _SCS("set_param"), _SCS("get_param"), PARAM_SPOT_ATTENUATION); } - - |