Browse Source

Merge pull request #798 from marynate/PR-fix-light-in-release-mode

Fix light was always been disabled in release mode (tools=no)
Juan Linietsky 11 years ago
parent
commit
88d64e7735
1 changed files with 1 additions and 4 deletions
  1. 1 4
      scene/3d/light.cpp

+ 1 - 4
scene/3d/light.cpp

@@ -436,9 +436,9 @@ void Light::_update_visibility() {
 		return;
 
 
+bool editor_ok=true;
 
 #ifdef TOOLS_ENABLED
-	bool editor_ok=true;
 	if (editor_only) {
 		if (!get_scene()->is_editor_hint()) {
 			editor_ok=false;
@@ -446,11 +446,8 @@ void Light::_update_visibility() {
 			editor_ok = (get_scene()->get_edited_scene_root() && (this==get_scene()->get_edited_scene_root() || get_owner()==get_scene()->get_edited_scene_root()));
 		}
 	}
-#else
-	bool editor_ok=false;
 #endif
 
-
 	VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible() && enabled && editor_ok);
 	_change_notify("geometry/visible");