Read bhkBlendCollisionObject

macos_ci_fix
Alexei Kotov 1 year ago
parent 70877c94bc
commit 0eb8d28e81

@ -281,6 +281,7 @@ namespace Nif
{ "bhkCollisionObject", &construct<bhkCollisionObject, RC_bhkCollisionObject> }, { "bhkCollisionObject", &construct<bhkCollisionObject, RC_bhkCollisionObject> },
{ "bhkPCollisionObject", &construct<bhkCollisionObject, RC_bhkCollisionObject> }, { "bhkPCollisionObject", &construct<bhkCollisionObject, RC_bhkCollisionObject> },
{ "bhkSPCollisionObject", &construct<bhkCollisionObject, RC_bhkCollisionObject> }, { "bhkSPCollisionObject", &construct<bhkCollisionObject, RC_bhkCollisionObject> },
{ "bhkBlendCollisionObject", &construct<bhkBlendCollisionObject, RC_bhkBlendCollisionObject> },
// Constraint records, Bethesda // Constraint records, Bethesda
{ "bhkHingeConstraint", &construct<bhkHingeConstraint, RC_bhkHingeConstraint> }, { "bhkHingeConstraint", &construct<bhkHingeConstraint, RC_bhkHingeConstraint> },

@ -342,6 +342,17 @@ namespace Nif
mBody.read(nif); mBody.read(nif);
} }
void bhkBlendCollisionObject::read(NIFStream* nif)
{
bhkCollisionObject::read(nif);
nif->read(mHeirGain);
nif->read(mVelGain);
if (nif->getBethVersion() <= 8)
nif->skip(8); // Unknown
}
void bhkWorldObject::read(NIFStream* nif) void bhkWorldObject::read(NIFStream* nif)
{ {
mShape.read(nif); mShape.read(nif);

@ -394,6 +394,14 @@ namespace Nif
} }
}; };
struct bhkBlendCollisionObject : bhkCollisionObject
{
float mHeirGain;
float mVelGain;
void read(NIFStream* nif) override;
};
// Abstract Havok shape info record // Abstract Havok shape info record
struct bhkWorldObject : public bhkSerializable struct bhkWorldObject : public bhkSerializable
{ {

@ -36,6 +36,7 @@ namespace Nif
{ {
RC_MISSING = 0, RC_MISSING = 0,
RC_AvoidNode, RC_AvoidNode,
RC_bhkBlendCollisionObject,
RC_bhkBlendController, RC_bhkBlendController,
RC_bhkBoxShape, RC_bhkBoxShape,
RC_bhkCapsuleShape, RC_bhkCapsuleShape,

Loading…
Cancel
Save