2
0
Эх сурвалжийг харах

Merge branch 'master' of https://github.com/godotengine/godot

Juan Linietsky 7 жил өмнө
parent
commit
8b41ebf784

+ 3 - 3
.travis.yml

@@ -30,9 +30,9 @@ matrix:
     - env: GODOT_TARGET=android TOOLS=no CACHE_NAME=${GODOT_TARGET}-gcc
       os: linux
       compiler: gcc
-    - env: GODOT_TARGET=osx TOOLS=yes CACHE_NAME=${GODOT_TARGET}-clang-tools
-      os: osx
-      compiler: clang
+    #- env: GODOT_TARGET=osx TOOLS=yes CACHE_NAME=${GODOT_TARGET}-clang-tools
+    #  os: osx
+    #  compiler: clang
     #- env: GODOT_TARGET=iphone TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang
     #  os: osx
     #  compiler: clang

+ 1 - 1
platform/android/build.gradle.template

@@ -31,7 +31,7 @@ android {
 		disable 'MissingTranslation'
 	}
 
-	compileSdkVersion 24
+	compileSdkVersion 26
 	buildToolsVersion "26.0.1"
 	useLibrary 'org.apache.http.legacy'
 

+ 11 - 4
servers/visual/visual_server_scene.cpp

@@ -303,6 +303,17 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
 
 		VSG::storage->instance_remove_dependency(instance->base, instance);
 
+		if (instance->base_type == VS::INSTANCE_GI_PROBE) {
+			//if gi probe is baking, wait until done baking, else race condition may happen when removing it
+			//from octree
+			InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(instance->base_data);
+
+			while (gi_probe->dynamic.updating_stage == GI_UPDATE_STAGE_LIGHTING) {
+				//wait until bake is done if it's baking
+				OS::get_singleton()->delay_usec(1);
+			}
+		}
+
 		if (scenario && instance->octree_id) {
 			scenario->octree.erase(instance->octree_id); //make dependencies generated by the octree go away
 			instance->octree_id = 0;
@@ -331,10 +342,6 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
 
 				InstanceGIProbeData *gi_probe = static_cast<InstanceGIProbeData *>(instance->base_data);
 
-				while (gi_probe->dynamic.updating_stage == GI_UPDATE_STAGE_LIGHTING) {
-					//wait until bake is done if it's baking
-					OS::get_singleton()->delay_usec(1);
-				}
 				if (gi_probe->update_element.in_list()) {
 					gi_probe_update_list.remove(&gi_probe->update_element);
 				}