瀏覽代碼

SoftBodySharedSettings::mEdgeGroupEndIndices was not serialized

This led to an assert and hang when trying to simulate a deserialized shape
Jorrit Rouwe 1 年之前
父節點
當前提交
ccb250747e
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Jolt/Physics/SoftBody/SoftBodySharedSettings.cpp

+ 3 - 0
Jolt/Physics/SoftBody/SoftBodySharedSettings.cpp

@@ -45,6 +45,7 @@ JPH_IMPLEMENT_SERIALIZABLE_NON_VIRTUAL(SoftBodySharedSettings)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mVertices)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mFaces)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mEdgeConstraints)
+	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mEdgeGroupEndIndices)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mVolumeConstraints)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mMaterials)
 }
@@ -139,6 +140,7 @@ void SoftBodySharedSettings::SaveBinaryState(StreamOut &inStream) const
 	inStream.Write(mVertices);
 	inStream.Write(mFaces);
 	inStream.Write(mEdgeConstraints);
+	inStream.Write(mEdgeGroupEndIndices);
 	inStream.Write(mVolumeConstraints);
 }
 
@@ -147,6 +149,7 @@ void SoftBodySharedSettings::RestoreBinaryState(StreamIn &inStream)
 	inStream.Read(mVertices);
 	inStream.Read(mFaces);
 	inStream.Read(mEdgeConstraints);
+	inStream.Read(mEdgeGroupEndIndices);
 	inStream.Read(mVolumeConstraints);
 }