Fix missing saving Pre Rotation

This commit is contained in:
Wojtek Figat
2021-02-12 10:34:50 +01:00
parent 62acae10a5
commit 5a23df6478
2 changed files with 5 additions and 1 deletions

View File

@@ -447,6 +447,7 @@ void SplineModel::Serialize(SerializeStream& stream, const void* otherObj)
SERIALIZE_MEMBER(BoundsScale, _boundsScale);
SERIALIZE_MEMBER(LODBias, _lodBias);
SERIALIZE_MEMBER(ForcedLOD, _forcedLod);
SERIALIZE_MEMBER(PreRotation, _preRotation)
SERIALIZE(Model);
SERIALIZE(DrawModes);
@@ -463,6 +464,7 @@ void SplineModel::Deserialize(DeserializeStream& stream, ISerializeModifier* mod
DESERIALIZE_MEMBER(BoundsScale, _boundsScale);
DESERIALIZE_MEMBER(LODBias, _lodBias);
DESERIALIZE_MEMBER(ForcedLOD, _forcedLod);
DESERIALIZE_MEMBER(PreRotation, _preRotation);
DESERIALIZE(Model);
DESERIALIZE(DrawModes);

View File

@@ -120,6 +120,7 @@ void SplineCollider::Serialize(SerializeStream& stream, const void* otherObj)
SERIALIZE_GET_OTHER_OBJ(SplineCollider);
SERIALIZE(CollisionData);
SERIALIZE_MEMBER(PreRotation, _preRotation)
}
void SplineCollider::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
@@ -128,6 +129,7 @@ void SplineCollider::Deserialize(DeserializeStream& stream, ISerializeModifier*
Collider::Deserialize(stream, modifier);
DESERIALIZE(CollisionData);
DESERIALIZE_MEMBER(PreRotation, _preRotation);
}
void SplineCollider::OnParentChanged()
@@ -325,7 +327,7 @@ void SplineCollider::GetGeometry(PxGeometryHolder& geometry)
#if !USE_EDITOR
// Free memory for static splines (if editor collision preview is not needed)
if (IsStatic())
if (IsTransformStatic())
{
_vertexBuffer.Resize(0);
_indexBuffer.Resize(0);