diff --git a/dlls/Android.mk b/dlls/Android.mk index 0e365441..c6b0a3d3 100644 --- a/dlls/Android.mk +++ b/dlls/Android.mk @@ -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 \ diff --git a/dlls/unpredictedweapon.cpp b/dlls/unpredictedweapon.cpp new file mode 100644 index 00000000..e50bf661 --- /dev/null +++ b/dlls/unpredictedweapon.cpp @@ -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 ) diff --git a/dlls/unpredictedweapon.h b/dlls/unpredictedweapon.h new file mode 100644 index 00000000..dc0e3938 --- /dev/null +++ b/dlls/unpredictedweapon.h @@ -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 +