mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-08 21:14:14 +00:00
Prop saverestore
This commit is contained in:
parent
271b1053ed
commit
3135c09e53
@ -94,6 +94,8 @@ public:
|
|||||||
virtual void BounceSound(void);
|
virtual void BounceSound(void);
|
||||||
virtual int BloodColor(void) { return DONT_BLEED; }
|
virtual int BloodColor(void) { return DONT_BLEED; }
|
||||||
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
virtual void Killed(entvars_t *pevAttacker, int iGib);
|
||||||
|
int Save( CSave &save );
|
||||||
|
int Restore( CRestore &restore );
|
||||||
|
|
||||||
virtual float TouchGravGun( CBaseEntity *attacker, int stage )
|
virtual float TouchGravGun( CBaseEntity *attacker, int stage )
|
||||||
{
|
{
|
||||||
@ -184,7 +186,6 @@ public:
|
|||||||
static const char **MaterialSoundList( Materials precacheMaterial, int &soundCount );
|
static const char **MaterialSoundList( Materials precacheMaterial, int &soundCount );
|
||||||
void EXPORT Die( void );
|
void EXPORT Die( void );
|
||||||
|
|
||||||
BOOL m_bBarrel;
|
|
||||||
float m_flFloorFriction;
|
float m_flFloorFriction;
|
||||||
float m_flCollideFriction;
|
float m_flCollideFriction;
|
||||||
|
|
||||||
@ -219,9 +220,43 @@ public:
|
|||||||
float m_flTouchTimer;
|
float m_flTouchTimer;
|
||||||
int m_iTouchCounter;
|
int m_iTouchCounter;
|
||||||
float m_flLastGravgun;
|
float m_flLastGravgun;
|
||||||
|
static TYPEDESCRIPTION m_SaveData[];
|
||||||
};
|
};
|
||||||
LINK_ENTITY_TO_CLASS(prop, CProp);
|
LINK_ENTITY_TO_CLASS(prop, CProp);
|
||||||
|
|
||||||
|
TYPEDESCRIPTION CProp::m_SaveData[] =
|
||||||
|
{
|
||||||
|
DEFINE_FIELD( CProp, m_shape, FIELD_INTEGER ),
|
||||||
|
DEFINE_FIELD( CProp, m_oldshape, FIELD_INTEGER ),
|
||||||
|
DEFINE_FIELD( CProp, m_pHolstered, FIELD_EHANDLE ),
|
||||||
|
DEFINE_FIELD( CProp, m_flSpawnHealth, FIELD_FLOAT ),
|
||||||
|
DEFINE_FIELD( CProp, m_flFloorFriction, FIELD_FLOAT ),
|
||||||
|
DEFINE_FIELD( CProp, m_flCollideFriction, FIELD_FLOAT ),
|
||||||
|
DEFINE_FIELD( CProp, minsH, FIELD_VECTOR ),
|
||||||
|
DEFINE_FIELD( CProp, maxsH, FIELD_VECTOR ),
|
||||||
|
DEFINE_FIELD( CProp, minsV, FIELD_VECTOR ),
|
||||||
|
DEFINE_FIELD( CProp, maxsV, FIELD_VECTOR ),
|
||||||
|
DEFINE_FIELD( CProp, spawnOrigin, FIELD_POSITION_VECTOR ),
|
||||||
|
DEFINE_FIELD( CProp, spawnAngles, FIELD_VECTOR ),
|
||||||
|
|
||||||
|
|
||||||
|
// breakable stuff
|
||||||
|
DEFINE_FIELD( CProp, m_Material, FIELD_INTEGER ),
|
||||||
|
DEFINE_FIELD( CProp, m_Explosion, FIELD_INTEGER ),
|
||||||
|
|
||||||
|
// Don't need to save/restore these because we precache after restore
|
||||||
|
// DEFINE_FIELD( CProp, m_idShard, FIELD_INTEGER ),
|
||||||
|
|
||||||
|
DEFINE_FIELD( CProp, m_angle, FIELD_FLOAT ),
|
||||||
|
DEFINE_FIELD( CProp, m_iszGibModel, FIELD_STRING ),
|
||||||
|
// Explosion magnitude is stored in pev->impulse
|
||||||
|
DEFINE_ARRAY( CProp, m_iaCustomAnglesX, FIELD_INTEGER, 10 ),
|
||||||
|
DEFINE_ARRAY( CProp, m_iaCustomAnglesZ, FIELD_INTEGER, 10 ),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
IMPLEMENT_SAVERESTORE( CProp, CBaseEntity )
|
||||||
|
|
||||||
static int propTouchSelector;
|
static int propTouchSelector;
|
||||||
|
|
||||||
const char *CProp::pSoundsWood[] =
|
const char *CProp::pSoundsWood[] =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user