mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-08 21:14:14 +00:00
Add unpredicted weapon wrapper class
This commit is contained in:
parent
316edf139b
commit
ac87c8f8c7
@ -129,6 +129,7 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \
|
||||
gravgun.cpp \
|
||||
ar2.cpp \
|
||||
big_cock.cpp \
|
||||
unpredictedweapon.cpp \
|
||||
../pm_shared/pm_debug.c \
|
||||
../pm_shared/pm_math.c \
|
||||
../pm_shared/pm_shared.c \
|
||||
|
24
dlls/unpredictedweapon.cpp
Normal file
24
dlls/unpredictedweapon.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "extdll.h"
|
||||
#include "util.h"
|
||||
#include "cbase.h"
|
||||
#include "unpredictedweapon.h"
|
||||
|
||||
BOOL CBasePlayerWeaponU::UseDecrement()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
float CBasePlayerWeaponU::UTIL_WeaponTimeBase()
|
||||
{
|
||||
return gpGlobals->time;
|
||||
}
|
||||
|
||||
TYPEDESCRIPTION CBasePlayerWeaponU::m_SaveData[] =
|
||||
{
|
||||
|
||||
DEFINE_FIELD( CBasePlayerWeapon, m_flNextPrimaryAttack, FIELD_TIME ),
|
||||
DEFINE_FIELD( CBasePlayerWeapon, m_flNextSecondaryAttack, FIELD_TIME ),
|
||||
DEFINE_FIELD( CBasePlayerWeapon, m_flTimeWeaponIdle, FIELD_TIME ),
|
||||
};
|
||||
|
||||
IMPLEMENT_SAVERESTORE( CBasePlayerWeaponU, CBasePlayerWeapon )
|
17
dlls/unpredictedweapon.h
Normal file
17
dlls/unpredictedweapon.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef UNPREDICTEDWEAPON_H
|
||||
#define UNPREDICTEDWEAPON_H
|
||||
|
||||
#include "weapons.h"
|
||||
|
||||
class CBasePlayerWeaponU: CBasePlayerWeapon
|
||||
{
|
||||
public:
|
||||
virtual int Save( CSave &save );
|
||||
virtual int Restore( CRestore &restore );
|
||||
static TYPEDESCRIPTION m_SaveData[];
|
||||
BOOL UseDecrement( void );
|
||||
float UTIL_WeaponTimeBase();
|
||||
};
|
||||
|
||||
#endif // UNPREDICTEDWEAPON_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user