Dump and load iw4 physpresets

This commit is contained in:
Jan
2022-01-02 10:25:48 +01:00
parent 87c2e58c4b
commit bcafddd83a
9 changed files with 496 additions and 3 deletions

View File

@ -0,0 +1,20 @@
#pragma once
#include "Game/IW4/IW4.h"
namespace IW4
{
inline cspField_t phys_preset_fields[]
{
{ "mass", offsetof(PhysPresetInfo, mass), CSPFT_FLOAT },
{ "bounce", offsetof(PhysPresetInfo, bounce), CSPFT_FLOAT },
{ "friction", offsetof(PhysPresetInfo, friction), CSPFT_FLOAT },
{ "isFrictionInfinity", offsetof(PhysPresetInfo, isFrictionInfinity), CSPFT_QBOOLEAN },
{ "bulletForceScale", offsetof(PhysPresetInfo, bulletForceScale), CSPFT_FLOAT },
{ "explosiveForceScale", offsetof(PhysPresetInfo, explosiveForceScale), CSPFT_FLOAT },
{ "sndAliasPrefix", offsetof(PhysPresetInfo, sndAliasPrefix), CSPFT_STRING },
{ "piecesSpreadFraction", offsetof(PhysPresetInfo, piecesSpreadFraction), CSPFT_FLOAT },
{ "piecesUpwardVelocity", offsetof(PhysPresetInfo, piecesUpwardVelocity), CSPFT_FLOAT },
{ "tempDefaultToCylinder", offsetof(PhysPresetInfo, tempDefaultToCylinder), CSPFT_QBOOLEAN },
{ "perSurfaceSndAlias", offsetof(PhysPresetInfo, perSurfaceSndAlias), CSPFT_QBOOLEAN },
};
}