Переглянути джерело

Fixed LoadSaveSceneTest forgetting to call Optimize

Jorrit Rouwe 1 рік тому
батько
коміт
0d4042364b
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      Samples/Tests/General/LoadSaveSceneTest.cpp

+ 4 - 0
Samples/Tests/General/LoadSaveSceneTest.cpp

@@ -215,6 +215,10 @@ void LoadSaveSceneTest::Initialize()
 	if (!ObjectStreamIn::sReadObject(data, scene))
 		FatalError("Failed to load scene");
 
+	// Ensure that the soft body shared settings have been optimized (this is not saved to a text file)
+	for (SoftBodyCreationSettings &soft_body : scene->GetSoftBodies())
+		const_cast<SoftBodySharedSettings *>(soft_body.mSettings.GetPtr())->Optimize();
+
 	// Instantiate scene
 	scene->CreateBodies(mPhysicsSystem);
 }