Browse Source

SoftBodySharedSettings::mEdgeGroupEndIndices was not serialized

This led to an assert and hang when trying to simulate a deserialized shape
Jorrit Rouwe 1 year ago
parent
commit
ccb250747e
1 changed files with 3 additions and 0 deletions
  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, mVertices)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mFaces)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mFaces)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mEdgeConstraints)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mEdgeConstraints)
+	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mEdgeGroupEndIndices)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mVolumeConstraints)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mVolumeConstraints)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mMaterials)
 	JPH_ADD_ATTRIBUTE(SoftBodySharedSettings, mMaterials)
 }
 }
@@ -139,6 +140,7 @@ void SoftBodySharedSettings::SaveBinaryState(StreamOut &inStream) const
 	inStream.Write(mVertices);
 	inStream.Write(mVertices);
 	inStream.Write(mFaces);
 	inStream.Write(mFaces);
 	inStream.Write(mEdgeConstraints);
 	inStream.Write(mEdgeConstraints);
+	inStream.Write(mEdgeGroupEndIndices);
 	inStream.Write(mVolumeConstraints);
 	inStream.Write(mVolumeConstraints);
 }
 }
 
 
@@ -147,6 +149,7 @@ void SoftBodySharedSettings::RestoreBinaryState(StreamIn &inStream)
 	inStream.Read(mVertices);
 	inStream.Read(mVertices);
 	inStream.Read(mFaces);
 	inStream.Read(mFaces);
 	inStream.Read(mEdgeConstraints);
 	inStream.Read(mEdgeConstraints);
+	inStream.Read(mEdgeGroupEndIndices);
 	inStream.Read(mVolumeConstraints);
 	inStream.Read(mVolumeConstraints);
 }
 }