Просмотр исходного кода

Fixed LoadSaveSceneTest forgetting to call Optimize

Jorrit Rouwe 1 год назад
Родитель
Сommit
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);
 }