mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-25 16:43:33 +00:00
Read all Bethesda Havok Action records
This commit is contained in:
parent
a18601d6e0
commit
67e24a0ffe
@ -440,6 +440,10 @@ namespace Nif
|
|||||||
{ "bhkPhysicsSystem", &construct<bhkPhysicsSystem, RC_bhkPhysicsSystem> },
|
{ "bhkPhysicsSystem", &construct<bhkPhysicsSystem, RC_bhkPhysicsSystem> },
|
||||||
{ "bhkRagdollSystem", &construct<bhkRagdollSystem, RC_bhkRagdollSystem> },
|
{ "bhkRagdollSystem", &construct<bhkRagdollSystem, RC_bhkRagdollSystem> },
|
||||||
|
|
||||||
|
// Action records
|
||||||
|
{ "bhkLiquidAction", &construct<bhkLiquidAction, RC_bhkLiquidAction> },
|
||||||
|
{ "bhkOrientHingedBodyAction", &construct<bhkOrientHingedBodyAction, RC_bhkOrientHingedBodyAction> },
|
||||||
|
|
||||||
// PROPERTIES
|
// PROPERTIES
|
||||||
|
|
||||||
// 4.0.0.2
|
// 4.0.0.2
|
||||||
|
@ -954,4 +954,36 @@ namespace Nif
|
|||||||
nif->read(mRemoveWhenBroken);
|
nif->read(mRemoveWhenBroken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bhkUnaryAction::read(NIFStream* nif)
|
||||||
|
{
|
||||||
|
mEntity.read(nif);
|
||||||
|
nif->skip(8); // Unused
|
||||||
|
}
|
||||||
|
|
||||||
|
void bhkUnaryAction::post(Reader& nif)
|
||||||
|
{
|
||||||
|
mEntity.post(nif);
|
||||||
|
}
|
||||||
|
|
||||||
|
void bhkLiquidAction::read(NIFStream* nif)
|
||||||
|
{
|
||||||
|
nif->skip(12); // Unused
|
||||||
|
nif->read(mInitialStickForce);
|
||||||
|
nif->read(mStickStrength);
|
||||||
|
nif->read(mNeighborDistance);
|
||||||
|
nif->read(mNeighborStrength);
|
||||||
|
}
|
||||||
|
|
||||||
|
void bhkOrientHingedBodyAction::read(NIFStream* nif)
|
||||||
|
{
|
||||||
|
bhkUnaryAction::read(nif);
|
||||||
|
|
||||||
|
nif->skip(8); // Unused
|
||||||
|
nif->read(mHingeAxisLS);
|
||||||
|
nif->read(mForwardLS);
|
||||||
|
nif->read(mStrength);
|
||||||
|
nif->read(mDamping);
|
||||||
|
nif->skip(8); // Unused
|
||||||
|
}
|
||||||
|
|
||||||
} // Namespace
|
} // Namespace
|
||||||
|
@ -875,5 +875,38 @@ namespace Nif
|
|||||||
void read(NIFStream* nif) override;
|
void read(NIFStream* nif) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Abstract action applied during the simulation
|
||||||
|
struct bhkAction : bhkSerializable
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bhkUnaryAction : bhkAction
|
||||||
|
{
|
||||||
|
bhkRigidBodyPtr mEntity;
|
||||||
|
|
||||||
|
void read(NIFStream* nif) override;
|
||||||
|
void post(Reader& nif) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bhkLiquidAction : bhkAction
|
||||||
|
{
|
||||||
|
float mInitialStickForce;
|
||||||
|
float mStickStrength;
|
||||||
|
float mNeighborDistance;
|
||||||
|
float mNeighborStrength;
|
||||||
|
|
||||||
|
void read(NIFStream* nif) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct bhkOrientHingedBodyAction : bhkUnaryAction
|
||||||
|
{
|
||||||
|
osg::Vec4f mHingeAxisLS;
|
||||||
|
osg::Vec4f mForwardLS;
|
||||||
|
float mStrength;
|
||||||
|
float mDamping;
|
||||||
|
|
||||||
|
void read(NIFStream* nif) override;
|
||||||
|
};
|
||||||
|
|
||||||
} // Namespace
|
} // Namespace
|
||||||
#endif
|
#endif
|
||||||
|
@ -54,12 +54,14 @@ namespace Nif
|
|||||||
RC_bhkConvexVerticesShape,
|
RC_bhkConvexVerticesShape,
|
||||||
RC_bhkHingeConstraint,
|
RC_bhkHingeConstraint,
|
||||||
RC_bhkLimitedHingeConstraint,
|
RC_bhkLimitedHingeConstraint,
|
||||||
|
RC_bhkLiquidAction,
|
||||||
RC_bhkListShape,
|
RC_bhkListShape,
|
||||||
RC_bhkMalleableConstraint,
|
RC_bhkMalleableConstraint,
|
||||||
RC_bhkMeshShape,
|
RC_bhkMeshShape,
|
||||||
RC_bhkMoppBvTreeShape,
|
RC_bhkMoppBvTreeShape,
|
||||||
RC_bhkMultiSphereShape,
|
RC_bhkMultiSphereShape,
|
||||||
RC_bhkNiTriStripsShape,
|
RC_bhkNiTriStripsShape,
|
||||||
|
RC_bhkOrientHingedBodyAction,
|
||||||
RC_bhkPackedNiTriStripsShape,
|
RC_bhkPackedNiTriStripsShape,
|
||||||
RC_bhkPlaneShape,
|
RC_bhkPlaneShape,
|
||||||
RC_bhkPhysicsSystem,
|
RC_bhkPhysicsSystem,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user