2015-06-30 12:46:07 +03:00
/*
*
* This program is free software ; you can redistribute it and / or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation ; either version 2 of the License , or ( at
* your option ) any later version .
*
* This program is distributed in the hope that it will be useful , but
* WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software Foundation ,
* Inc . , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
*
* In addition , as a special exception , the author gives permission to
* link the code of this program with the Half - Life Game Engine ( " HL
* Engine " ) and Modified Game Libraries ( " MODs " ) developed by Valve,
* L . L . C ( " Valve " ) . You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve . If you modify this file , you may extend this exception
* to your version of the file , but you are not obligated to do so . If
* you do not wish to do so , delete this exception statement from your
* version .
*
*/
# ifndef WEAPONS_H
# define WEAPONS_H
# ifdef _WIN32
# pragma once
# endif
class CBasePlayer ;
# define MAX_WEAPONS 32
2015-09-16 23:19:21 +03:00
# define MAX_NORMAL_BATTERY 100.0f
2016-02-23 02:13:52 +03:00
# define DISTANCE_RELOAD_SOUND 512.0f
2015-06-30 12:46:07 +03:00
# define ITEM_FLAG_SELECTONEMPTY 1
# define ITEM_FLAG_NOAUTORELOAD 2
# define ITEM_FLAG_NOAUTOSWITCHEMPTY 4
# define ITEM_FLAG_LIMITINWORLD 8
2016-02-04 03:18:26 +03:00
# define ITEM_FLAG_EXHAUSTIBLE 16 // A player can totally exhaust their ammo supply and lose this weapon
2015-06-30 12:46:07 +03:00
# define WEAPON_IS_ONTARGET 0x40
2015-12-09 01:39:54 +03:00
// the maximum amount of ammo each weapon's clip can hold
2015-06-30 12:46:07 +03:00
# define WEAPON_NOCLIP -1
2015-12-09 01:39:54 +03:00
# define LOUD_GUN_VOLUME 1000
# define NORMAL_GUN_VOLUME 600
# define QUIET_GUN_VOLUME 200
# define BRIGHT_GUN_FLASH 512
# define NORMAL_GUN_FLASH 256
# define DIM_GUN_FLASH 128
# define BIG_EXPLOSION_VOLUME 2048
# define NORMAL_EXPLOSION_VOLUME 1024
# define SMALL_EXPLOSION_VOLUME 512
2015-08-02 20:45:57 +03:00
# define WEAPON_ACTIVITY_VOLUME 64
2015-12-09 01:39:54 +03:00
// spawn flags
2015-08-02 20:45:57 +03:00
# define SF_DETONATE 0x0001 // Grenades flagged with this will be triggered when the owner calls detonateSatchelCharges
2016-04-05 03:12:05 +03:00
# include "weapontype.h"
# include "wpn_shared.h"
2015-09-16 23:19:21 +03:00
// custom enum
2016-05-17 21:01:46 +03:00
enum ArmorType
{
ARMOR_NONE , // no armor
ARMOR_KEVLAR , // body vest only
ARMOR_VESTHELM , // vest and helmet
} ;
2015-09-16 23:19:21 +03:00
enum ArmouryItemPack
{
ARMOURY_MP5NAVY ,
ARMOURY_TMP ,
ARMOURY_P90 ,
ARMOURY_MAC10 ,
ARMOURY_AK47 ,
ARMOURY_SG552 ,
ARMOURY_M4A1 ,
ARMOURY_AUG ,
ARMOURY_SCOUT ,
ARMOURY_G3SG1 ,
ARMOURY_AWP ,
ARMOURY_M3 ,
ARMOURY_XM1014 ,
ARMOURY_M249 ,
ARMOURY_FLASHBANG ,
ARMOURY_HEGRENADE ,
ARMOURY_KEVLAR ,
ARMOURY_ASSAULT ,
2016-10-07 15:19:51 +03:00
ARMOURY_SMOKEGRENADE ,
ARMOURY_SHIELD ,
ARMOURY_FAMAS ,
ARMOURY_SG550 ,
ARMOURY_GALIL ,
ARMOURY_UMP45 ,
ARMOURY_GLOCK18 ,
ARMOURY_USP ,
ARMOURY_ELITE ,
ARMOURY_FIVESEVEN ,
ARMOURY_P228 ,
ARMOURY_DEAGLE
2015-09-16 23:19:21 +03:00
} ;
2015-11-24 00:01:09 +03:00
struct ItemInfo
2015-06-30 12:46:07 +03:00
{
int iSlot ;
int iPosition ;
const char * pszAmmo1 ;
int iMaxAmmo1 ;
const char * pszAmmo2 ;
int iMaxAmmo2 ;
const char * pszName ;
int iMaxClip ;
int iId ;
int iFlags ;
int iWeight ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2015-11-24 00:01:09 +03:00
struct AmmoInfo
2015-06-30 12:46:07 +03:00
{
const char * pszName ;
int iId ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2015-11-24 00:01:09 +03:00
struct MULTIDAMAGE
2015-06-30 12:46:07 +03:00
{
CBaseEntity * pEntity ;
float amount ;
int type ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CArmoury : public CBaseEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
virtual void Restart ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
2016-08-24 17:21:54 +03:00
# ifdef REGAMEDLL_ADD
virtual void SetObjectCollisionBox ( ) ;
# endif
2015-09-16 23:19:21 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
void EXPORT ArmouryTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
2016-07-14 17:12:17 +03:00
private :
void Draw ( ) ;
void Hide ( ) ;
2015-06-30 12:46:07 +03:00
public :
2016-06-20 22:32:02 +03:00
ArmouryItemPack m_iItem ;
2015-06-30 12:46:07 +03:00
int m_iCount ;
int m_iInitialCount ;
bool m_bAlreadyCounted ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CGrenade : public CBaseMonster
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
2015-08-02 20:45:57 +03:00
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual int ObjectCaps ( ) { return m_bIsC4 ? FCAP_CONTINUOUS_USE : 0 ; }
2015-11-24 00:01:09 +03:00
virtual void Killed ( entvars_t * pevAttacker , int iGib ) ;
2016-02-04 03:18:26 +03:00
virtual int BloodColor ( ) { return DONT_BLEED ; }
2015-11-24 00:01:09 +03:00
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2016-02-04 03:18:26 +03:00
virtual void BounceSound ( ) ;
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
enum SATCHELCODE
2015-06-30 12:46:07 +03:00
{
SATCHEL_DETONATE ,
SATCHEL_RELEASE
2015-11-24 00:01:09 +03:00
} ;
2015-06-30 12:46:07 +03:00
public :
2015-08-02 20:45:57 +03:00
static CGrenade * ShootTimed ( entvars_t * pevOwner , Vector vecStart , Vector vecVelocity , float time ) ;
static CGrenade * ShootTimed2 ( entvars_t * pevOwner , Vector vecStart , Vector vecVelocity , float time , int iTeam , unsigned short usEvent ) ;
2016-02-23 02:13:52 +03:00
static CGrenade * ShootContact ( entvars_t * pevOwner , Vector vecStart , Vector vecVelocity ) ;
2015-08-02 20:45:57 +03:00
static CGrenade * ShootSmokeGrenade ( entvars_t * pevOwner , Vector vecStart , Vector vecVelocity , float time , unsigned short usEvent ) ;
static CGrenade * ShootSatchelCharge ( entvars_t * pevOwner , Vector vecStart , Vector vecVelocity ) ;
2016-02-23 02:13:52 +03:00
static void UseSatchelCharges ( entvars_t * pevOwner , SATCHELCODE code ) ;
2015-08-02 20:45:57 +03:00
public :
void Explode ( Vector vecSrc , Vector vecAim ) ;
void Explode ( TraceResult * pTrace , int bitsDamageType ) ;
void Explode2 ( TraceResult * pTrace , int bitsDamageType ) ;
void Explode3 ( TraceResult * pTrace , int bitsDamageType ) ;
2016-02-23 02:13:52 +03:00
void SG_Explode ( TraceResult * pTrace , int bitsDamageType ) ;
2015-08-02 20:45:57 +03:00
2016-02-04 03:18:26 +03:00
void EXPORT Smoke ( ) ;
void EXPORT Smoke2 ( ) ;
void EXPORT Smoke3_A ( ) ;
void EXPORT Smoke3_B ( ) ;
void EXPORT Smoke3_C ( ) ;
void EXPORT SG_Smoke ( ) ;
2015-08-02 20:45:57 +03:00
void EXPORT BounceTouch ( CBaseEntity * pOther ) ;
void EXPORT SlideTouch ( CBaseEntity * pOther ) ;
2015-06-30 12:46:07 +03:00
void EXPORT C4Touch ( CBaseEntity * pOther ) ;
2015-08-02 20:45:57 +03:00
void EXPORT ExplodeTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
void EXPORT DangerSoundThink ( ) ;
void EXPORT PreDetonate ( ) ;
void EXPORT Detonate ( ) ;
void EXPORT SG_Detonate ( ) ;
void EXPORT Detonate2 ( ) ;
void EXPORT Detonate3 ( ) ;
2015-08-02 20:45:57 +03:00
void EXPORT DetonateUse ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2016-02-04 03:18:26 +03:00
void EXPORT TumbleThink ( ) ;
void EXPORT SG_TumbleThink ( ) ;
void EXPORT C4Think ( ) ;
2015-06-30 12:46:07 +03:00
public :
2015-12-09 01:39:54 +03:00
static TYPEDESCRIPTION IMPL ( m_SaveData ) [ 15 ] ;
2015-06-30 12:46:07 +03:00
bool m_bStartDefuse ;
bool m_bIsC4 ;
EHANDLE m_pBombDefuser ;
float m_flDefuseCountDown ;
float m_flC4Blow ;
float m_flNextFreqInterval ;
float m_flNextBeep ;
float m_flNextFreq ;
char * m_sBeepName ;
float m_fAttenu ;
float m_flNextBlink ;
float m_fNextDefuse ;
bool m_bJustBlew ;
int m_iTeam ;
int m_iCurWave ;
edict_t * m_pentCurBombTarget ;
int m_SGSmoke ;
int m_angle ;
unsigned short m_usEvent ;
bool m_bLightSmoke ;
bool m_bDetonated ;
Vector m_vSmokeDetonate ;
int m_iBounceCount ;
BOOL m_fRegisteredSound ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CBasePlayerItem : public CBaseAnimating
{
public :
2015-09-16 23:19:21 +03:00
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual void SetObjectCollisionBox ( ) ;
virtual CBaseEntity * Respawn ( ) ;
2015-09-16 23:19:21 +03:00
virtual int AddToPlayer ( CBasePlayer * pPlayer ) ;
2016-02-04 03:18:26 +03:00
virtual int AddDuplicate ( CBasePlayerItem * pItem ) { return FALSE ; }
virtual int GetItemInfo ( ItemInfo * p ) { return 0 ; }
virtual BOOL CanDeploy ( ) { return TRUE ; }
virtual BOOL CanDrop ( ) { return TRUE ; }
virtual BOOL Deploy ( ) { return TRUE ; }
virtual BOOL IsWeapon ( ) { return FALSE ; }
virtual BOOL CanHolster ( ) { return TRUE ; }
2015-06-30 12:46:07 +03:00
virtual void Holster ( int skiplocal = 0 ) ;
2016-02-04 03:18:26 +03:00
virtual void UpdateItemInfo ( ) { }
virtual void ItemPreFrame ( ) { }
virtual void ItemPostFrame ( ) { }
virtual void Drop ( ) ;
virtual void Kill ( ) ;
2015-09-16 23:19:21 +03:00
virtual void AttachToPlayer ( CBasePlayer * pPlayer ) ;
2016-02-04 03:18:26 +03:00
virtual int PrimaryAmmoIndex ( ) { return - 1 ; }
virtual int SecondaryAmmoIndex ( ) { return - 1 ; }
virtual int UpdateClientData ( CBasePlayer * pPlayer ) { return 0 ; }
virtual CBasePlayerItem * GetWeaponPtr ( ) { return NULL ; }
virtual float GetMaxSpeed ( ) { return 260.0f ; }
virtual int iItemSlot ( ) { return 0 ; }
2015-06-30 12:46:07 +03:00
public :
2016-02-04 03:18:26 +03:00
void EXPORT DestroyItem ( ) ;
2015-06-30 12:46:07 +03:00
void EXPORT DefaultTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
void EXPORT FallThink ( ) ;
void EXPORT Materialize ( ) ;
void EXPORT AttemptToMaterialize ( ) ;
void FallInit ( ) ;
void CheckRespawn ( ) ;
2015-06-30 12:46:07 +03:00
2015-12-09 01:39:54 +03:00
public :
2016-02-23 02:13:52 +03:00
inline int iItemPosition ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . iPosition ; }
inline const char * pszAmmo1 ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . pszAmmo1 ; }
inline int iMaxAmmo1 ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . iMaxAmmo1 ; }
inline const char * pszAmmo2 ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . pszAmmo2 ; }
inline int iMaxAmmo2 ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . iMaxAmmo2 ; }
inline const char * pszName ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . pszName ; }
inline int iMaxClip ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . iMaxClip ; }
inline int iWeight ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . iWeight ; }
inline int iFlags ( ) const { return IMPL ( ItemInfoArray ) [ m_iId ] . iFlags ; }
2015-12-09 01:39:54 +03:00
2016-02-04 03:18:26 +03:00
public :
2015-12-09 01:39:54 +03:00
static TYPEDESCRIPTION IMPL ( m_SaveData ) [ 3 ] ;
2016-02-23 02:13:52 +03:00
static ItemInfo IMPL ( ItemInfoArray ) [ MAX_WEAPONS ] ;
static AmmoInfo IMPL ( AmmoInfoArray ) [ MAX_AMMO_SLOTS ] ;
2015-06-30 12:46:07 +03:00
2015-07-05 14:05:26 +03:00
CBasePlayer * m_pPlayer ;
2015-06-30 12:46:07 +03:00
CBasePlayerItem * m_pNext ;
int m_iId ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CBasePlayerWeapon : public CBasePlayerItem
{
public :
2015-09-16 23:19:21 +03:00
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2015-06-30 12:46:07 +03:00
virtual int AddToPlayer ( CBasePlayer * pPlayer ) ;
virtual int AddDuplicate ( CBasePlayerItem * pItem ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL CanDeploy ( ) ;
virtual BOOL IsWeapon ( ) { return TRUE ; }
2015-09-16 23:19:21 +03:00
virtual void Holster ( int skiplocal = 0 ) ;
2016-02-04 03:18:26 +03:00
virtual void UpdateItemInfo ( ) { } ;
virtual void ItemPostFrame ( ) ;
virtual int PrimaryAmmoIndex ( ) ;
virtual int SecondaryAmmoIndex ( ) ;
2015-06-30 12:46:07 +03:00
virtual int UpdateClientData ( CBasePlayer * pPlayer ) ;
2016-02-04 03:18:26 +03:00
virtual CBasePlayerItem * GetWeaponPtr ( ) { return ( CBasePlayerItem * ) this ; }
2015-06-30 12:46:07 +03:00
virtual int ExtractAmmo ( CBasePlayerWeapon * pWeapon ) ;
virtual int ExtractClipAmmo ( CBasePlayerWeapon * pWeapon ) ;
2016-02-04 03:18:26 +03:00
virtual int AddWeapon ( )
2015-06-30 12:46:07 +03:00
{
ExtractAmmo ( this ) ;
return 1 ;
}
2016-02-04 03:18:26 +03:00
virtual BOOL PlayEmptySound ( ) ;
virtual void ResetEmptySound ( ) ;
2015-09-16 23:19:21 +03:00
virtual void SendWeaponAnim ( int iAnim , int skiplocal = 0 ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL IsUseable ( ) ;
virtual void PrimaryAttack ( ) { } ;
virtual void SecondaryAttack ( ) { } ;
virtual void Reload ( ) { } ;
virtual void WeaponIdle ( ) { } ;
virtual void RetireWeapon ( ) ;
virtual BOOL ShouldWeaponIdle ( ) { return FALSE ; }
virtual BOOL UseDecrement ( ) { return FALSE ; }
2015-06-30 12:46:07 +03:00
public :
2015-09-16 23:19:21 +03:00
BOOL AddPrimaryAmmo ( int iCount , char * szName , int iMaxClip , int iMaxCarry ) ;
BOOL AddSecondaryAmmo ( int iCount , char * szName , int iMaxCarry ) ;
BOOL DefaultDeploy ( char * szViewModel , char * szWeaponModel , int iAnim , char * szAnimExt , int skiplocal = 0 ) ;
int DefaultReload ( int iClipSize , int iAnim , float fDelay ) ;
void FireRemaining ( int & shotsFired , float & shootTime , BOOL isGlock18 ) ;
void KickBack ( float up_base , float lateral_base , float up_modifier , float lateral_modifier , float up_max , float lateral_max , int direction_change ) ;
2016-02-04 03:18:26 +03:00
void EjectBrassLate ( ) ;
2016-02-23 02:13:52 +03:00
void MakeBeam ( ) ;
void BeamUpdate ( ) ;
2016-02-04 03:18:26 +03:00
void ReloadSound ( ) ;
2015-06-30 12:46:07 +03:00
float GetNextAttackDelay ( float delay ) ;
float GetNextAttackDelay2 ( float delay ) ;
2016-02-04 03:18:26 +03:00
bool HasSecondaryAttack ( ) ;
BOOL IsPistol ( ) { return ( m_iId = = WEAPON_USP | | m_iId = = WEAPON_GLOCK18 | | m_iId = = WEAPON_P228 | | m_iId = = WEAPON_DEAGLE | | m_iId = = WEAPON_ELITE | | m_iId = = WEAPON_FIVESEVEN ) ; }
void SetPlayerShieldAnim ( ) ;
void ResetPlayerShieldAnim ( ) ;
2015-11-24 00:01:09 +03:00
bool ShieldSecondaryFire ( int iUpAnim , int iDownAnim ) ;
2016-06-08 00:41:07 +03:00
void InstantReload ( bool bCanRefillBPAmmo = false ) ;
2015-06-30 12:46:07 +03:00
public :
2015-12-09 01:39:54 +03:00
static TYPEDESCRIPTION IMPL ( m_SaveData ) [ 7 ] ;
2015-06-30 12:46:07 +03:00
int m_iPlayEmptySound ;
int m_fFireOnEmpty ;
2016-04-05 03:12:05 +03:00
float m_flNextPrimaryAttack ; // soonest time ItemPostFrame will call PrimaryAttack
float m_flNextSecondaryAttack ; // soonest time ItemPostFrame will call SecondaryAttack
float m_flTimeWeaponIdle ; // soonest time ItemPostFrame will call WeaponIdle
int m_iPrimaryAmmoType ; // "primary" ammo index into players m_rgAmmo[]
int m_iSecondaryAmmoType ; // "secondary" ammo index into players m_rgAmmo[]
int m_iClip ; // number of shots left in the primary weapon clip, -1 it not used
int m_iClientClip ; // the last version of m_iClip sent to hud dll
int m_iClientWeaponState ; // the last version of the weapon state sent to hud dll (is current weapon, is on target)
int m_fInReload ; // Are we in the middle of a reload;
int m_fInSpecialReload ; // Are we in the middle of a reload for the shotguns
int m_iDefaultAmmo ; // how much ammo you get when you pick up this weapon as placed by a level designer.
2015-06-30 12:46:07 +03:00
int m_iShellId ;
float m_fMaxSpeed ;
bool m_bDelayFire ;
int m_iDirection ;
bool m_bSecondarySilencerOn ;
float m_flAccuracy ;
float m_flLastFire ;
int m_iShotsFired ;
Vector m_vVecAiming ;
string_t model_name ;
2016-01-19 14:54:31 +03:00
float m_flGlock18Shoot ; // time to shoot the remaining bullets of the glock18 burst fire
int m_iGlock18ShotsFired ; // used to keep track of the shots fired during the Glock18 burst fire mode.
2015-06-30 12:46:07 +03:00
float m_flFamasShoot ;
int m_iFamasShotsFired ;
float m_fBurstSpread ;
int m_iWeaponState ;
float m_flNextReload ;
float m_flDecreaseShotsFired ;
unsigned short m_usFireGlock18 ;
unsigned short m_usFireFamas ;
2016-04-05 03:12:05 +03:00
// hle time creep vars
2015-06-30 12:46:07 +03:00
float m_flPrevPrimaryAttack ;
float m_flLastFireTime ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CBasePlayerAmmo : public CBaseEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual BOOL AddAmmo ( CBaseEntity * pOther ) { return TRUE ; }
virtual CBaseEntity * Respawn ( ) ;
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
public :
void EXPORT DefaultTouch ( CBaseEntity * pOther ) ;
2016-02-04 03:18:26 +03:00
void EXPORT Materialize ( ) ;
} ;
2015-06-30 12:46:07 +03:00
class CWeaponBox : public CBaseEntity
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-09-16 23:19:21 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
virtual int Save ( CSave & save ) ;
virtual int Restore ( CRestore & restore ) ;
2016-02-04 03:18:26 +03:00
virtual void SetObjectCollisionBox ( ) ;
2015-09-16 23:19:21 +03:00
virtual void Touch ( CBaseEntity * pOther ) ;
2015-06-30 12:46:07 +03:00
public :
2016-02-04 03:18:26 +03:00
BOOL IsEmpty ( ) ;
2015-11-24 00:01:09 +03:00
int GiveAmmo ( int iCount , char * szName , int iMax , int * pIndex = NULL ) ;
2015-06-30 12:46:07 +03:00
2016-02-04 03:18:26 +03:00
void EXPORT Kill ( ) ;
void EXPORT BombThink ( ) ;
2015-06-30 12:46:07 +03:00
BOOL HasWeapon ( CBasePlayerItem * pCheckItem ) ;
BOOL PackWeapon ( CBasePlayerItem * pWeapon ) ;
BOOL PackAmmo ( int iszName , int iCount ) ;
2016-02-04 03:18:26 +03:00
public :
2015-12-09 01:39:54 +03:00
static TYPEDESCRIPTION IMPL ( m_SaveData ) [ 4 ] ;
2015-06-30 12:46:07 +03:00
CBasePlayerItem * m_rgpPlayerItems [ MAX_ITEM_TYPES ] ;
int m_rgiszAmmo [ MAX_AMMO_SLOTS ] ;
int m_rgAmmo [ MAX_AMMO_SLOTS ] ;
int m_cAmmoTypes ;
bool m_bIsBomb ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CUSP : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-06-30 12:46:07 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return PISTOL_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-23 02:13:52 +03:00
virtual BOOL IsPistol ( ) { return TRUE ; }
2015-06-30 12:46:07 +03:00
2015-09-16 23:19:21 +03:00
public :
2015-11-24 00:01:09 +03:00
void USPFire ( float flSpread , float flCycleTime , BOOL fUseSemi ) ;
2016-02-23 02:13:52 +03:00
void MakeBeam ( ) ;
void BeamUpdate ( ) ;
2015-11-24 00:01:09 +03:00
2015-09-16 23:19:21 +03:00
int m_iShell ;
2015-11-24 00:01:09 +03:00
2015-09-16 23:19:21 +03:00
private :
unsigned short m_usFireUSP ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CMP5N : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return MP5N_MAX_SPEED ; }
2016-03-17 20:44:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void MP5NFire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireMP5N ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CSG552 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void SG552Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireSG552 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CAK47 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return AK47_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void AK47Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireAK47 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CAUG : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return AUG_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void AUGFire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireAug ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CAWP : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-09-16 23:19:21 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-09-16 23:19:21 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
return TRUE ;
# else
return FALSE ;
2015-09-16 23:19:21 +03:00
# endif
}
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void AWPFire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-09-16 23:19:21 +03:00
2015-06-30 12:46:07 +03:00
int m_iShell ;
2015-09-16 23:19:21 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireAWP ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
2016-12-06 22:21:52 +03:00
// for usermsg BombDrop
# define BOMB_FLAG_DROPPED 0 // if the bomb was dropped due to voluntary dropping or death/disconnect
# define BOMB_FLAG_PLANTED 1 // if the bomb has been planted will also trigger the round timer to hide will also show where the dropped bomb on the Terrorist team's radar.
2015-06-30 12:46:07 +03:00
class CC4 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-09-28 03:13:39 +03:00
virtual void KeyValue ( KeyValueData * pkvd ) ;
2015-11-24 00:01:09 +03:00
virtual void Use ( CBaseEntity * pActivator , CBaseEntity * pCaller , USE_TYPE useType , float value ) ;
2015-09-28 03:13:39 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2015-09-28 03:13:39 +03:00
virtual void Holster ( int skiplocal ) ;
2016-02-04 03:18:26 +03:00
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return C4_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
bool m_bStartedArming ;
bool m_bBombPlacedAnimation ;
float m_fArmedTime ;
2016-02-04 03:18:26 +03:00
2015-06-30 12:46:07 +03:00
private :
bool m_bHasShield ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CDEAGLE : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return PISTOL_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-23 02:13:52 +03:00
virtual BOOL IsPistol ( ) { return TRUE ; }
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void DEAGLEFire ( float flSpread , float flCycleTime , BOOL fUseSemi ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireDeagle ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CFlashbang : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL CanDeploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual BOOL CanDrop ( ) { return FALSE ; }
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2015-11-24 00:01:09 +03:00
virtual void Holster ( int skiplocal ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return GRENADE_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-04 03:18:26 +03:00
virtual BOOL IsPistol ( )
2015-06-30 12:46:07 +03:00
{
2015-12-05 22:40:30 +03:00
# ifdef REGAMEDLL_FIXES
2015-11-24 00:01:09 +03:00
return FALSE ;
2015-12-05 22:40:30 +03:00
# else
2015-11-24 00:01:09 +03:00
// TODO: why the object flashbang is IsPistol?
2015-06-30 12:46:07 +03:00
return TRUE ;
2016-02-23 02:13:52 +03:00
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
bool ShieldSecondaryFire ( int iUpAnim , int iDownAnim ) ;
2016-02-04 03:18:26 +03:00
void SetPlayerShieldAnim ( ) ;
void ResetPlayerShieldAnim ( ) ;
} ;
2015-06-30 12:46:07 +03:00
class CG3SG1 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void G3SG1Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireG3SG1 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CGLOCK18 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-09-28 03:13:39 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return PISTOL_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-23 02:13:52 +03:00
virtual BOOL IsPistol ( ) { return TRUE ; }
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-09-28 03:13:39 +03:00
void GLOCK18Fire ( float flSpread , float flCycleTime , BOOL bFireBurst ) ;
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
bool m_bBurstFire ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CHEGrenade : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL CanDeploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual BOOL CanDrop ( ) { return FALSE ; }
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2015-11-24 00:01:09 +03:00
virtual void Holster ( int skiplocal ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return GRENADE_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
bool ShieldSecondaryFire ( int iUpAnim , int iDownAnim ) ;
2016-02-04 03:18:26 +03:00
void SetPlayerShieldAnim ( ) ;
void ResetPlayerShieldAnim ( ) ;
2015-06-30 12:46:07 +03:00
public :
unsigned short m_usCreateExplosion ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CKnife : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-09-27 16:59:44 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-23 02:13:52 +03:00
virtual BOOL CanDrop ( ) { return FALSE ; }
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2015-09-27 16:59:44 +03:00
virtual void Holster ( int skiplocal ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return KNIFE_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-04 03:18:26 +03:00
virtual void WeaponIdle ( ) ;
2015-09-27 16:59:44 +03:00
2015-06-30 12:46:07 +03:00
public :
2016-02-04 03:18:26 +03:00
void EXPORT SwingAgain ( ) ;
void EXPORT Smack ( ) ;
2015-09-27 16:59:44 +03:00
2016-02-23 02:13:52 +03:00
void WeaponAnimation ( int iAnimation ) ;
2015-09-27 16:59:44 +03:00
int Stab ( int fFirst ) ;
int Swing ( int fFirst ) ;
2015-06-30 12:46:07 +03:00
public :
2016-02-04 03:18:26 +03:00
bool ShieldSecondaryFire ( int iUpAnim , int iDownAnim ) ;
void SetPlayerShieldAnim ( ) ;
void ResetPlayerShieldAnim ( ) ;
2015-09-27 16:59:44 +03:00
2015-06-30 12:46:07 +03:00
public :
TraceResult m_trHit ;
unsigned short m_usKnife ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CM249 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return M249_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void M249Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireM249 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CM3 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return M3_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
public :
int m_iShell ;
float m_flPumpTime ;
private :
unsigned short m_usFireM3 ;
2016-02-04 03:18:26 +03:00
} ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
class CM4A1 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void M4A1Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireM4A1 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CMAC10 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return MAC10_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void MAC10Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireMAC10 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CP228 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return PISTOL_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-23 02:13:52 +03:00
virtual BOOL IsPistol ( ) { return TRUE ; }
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-12-09 01:39:54 +03:00
void P228Fire ( float flSpread , float flCycleTime , BOOL fUseSemi ) ;
2016-02-23 02:13:52 +03:00
void MakeBeam ( ) ;
void BeamUpdate ( ) ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireP228 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CP90 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-09-16 23:19:21 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void P90Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireP90 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CSCOUT : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void SCOUTFire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
2015-09-16 23:19:21 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireScout ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CSmokeGrenade : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL CanDeploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual BOOL CanDrop ( ) { return FALSE ; }
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2015-11-24 00:01:09 +03:00
virtual void Holster ( int skiplocal ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return GRENADE_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
bool ShieldSecondaryFire ( int iUpAnim , int iDownAnim ) ;
2016-02-04 03:18:26 +03:00
void SetPlayerShieldAnim ( ) ;
void ResetPlayerShieldAnim ( ) ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
unsigned short m_usCreateSmoke ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CTMP : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return TMP_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void TMPFire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireTMP ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CXM1014 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return XM1014_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
float m_flPumpTime ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireXM1014 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CELITE : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return ELITE_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PISTOL_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-23 02:13:52 +03:00
virtual BOOL IsPistol ( ) { return TRUE ; }
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void ELITEFire ( float flSpread , float flCycleTime , BOOL fUseSemi ) ;
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
2016-04-05 03:12:05 +03:00
private :
2015-06-30 12:46:07 +03:00
unsigned short m_usFireELITE_LEFT ;
unsigned short m_usFireELITE_RIGHT ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CFiveSeven : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return m_fMaxSpeed ; }
virtual int iItemSlot ( ) { return PISTOL_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2016-02-23 02:13:52 +03:00
virtual BOOL IsPistol ( ) { return TRUE ; }
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void FiveSevenFire ( float flSpread , float flCycleTime , BOOL fUseSemi ) ;
2016-02-23 02:13:52 +03:00
void MakeBeam ( ) ;
void BeamUpdate ( ) ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireFiveSeven ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CUMP45 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return UMP45_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void UMP45Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireUMP45 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CSG550 : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
virtual float GetMaxSpeed ( ) ;
2016-02-23 02:13:52 +03:00
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void SG550Fire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
int m_iShell ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireSG550 ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CGalil : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return GALIL_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void GalilFire ( float flSpread , float flCycleTime , BOOL fUseAutoAim ) ;
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
int iShellOn ;
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
private :
unsigned short m_usFireGalil ;
2016-02-04 03:18:26 +03:00
} ;
2015-06-30 12:46:07 +03:00
class CFamas : public CBasePlayerWeapon
{
public :
2016-02-04 03:18:26 +03:00
virtual void Spawn ( ) ;
virtual void Precache ( ) ;
2015-11-24 00:01:09 +03:00
virtual int GetItemInfo ( ItemInfo * p ) ;
2016-02-04 03:18:26 +03:00
virtual BOOL Deploy ( ) ;
2016-02-23 02:13:52 +03:00
virtual float GetMaxSpeed ( ) { return FAMAS_MAX_SPEED ; }
virtual int iItemSlot ( ) { return PRIMARY_WEAPON_SLOT ; }
2016-02-04 03:18:26 +03:00
virtual void PrimaryAttack ( ) ;
virtual void SecondaryAttack ( ) ;
virtual void Reload ( ) ;
virtual void WeaponIdle ( ) ;
virtual BOOL UseDecrement ( )
2015-06-30 12:46:07 +03:00
{
2015-12-09 01:39:54 +03:00
# ifdef CLIENT_WEAPONS
2015-06-30 12:46:07 +03:00
return TRUE ;
2015-12-09 01:39:54 +03:00
# else
return FALSE ;
# endif
2015-06-30 12:46:07 +03:00
}
2015-11-24 00:01:09 +03:00
2015-06-30 12:46:07 +03:00
public :
2015-11-24 00:01:09 +03:00
void FamasFire ( float flSpread , float flCycleTime , BOOL fUseAutoAim , BOOL bFireBurst ) ;
2015-06-30 12:46:07 +03:00
public :
int m_iShell ;
int iShellOn ;
2016-02-04 03:18:26 +03:00
} ;
2015-12-09 01:39:54 +03:00
extern short g_sModelIndexLaser ;
extern const char * g_pModelNameLaser ;
extern short g_sModelIndexLaserDot ;
extern short g_sModelIndexFireball ;
extern short g_sModelIndexSmoke ;
extern short g_sModelIndexWExplosion ;
extern short g_sModelIndexBubbles ;
extern short g_sModelIndexBloodDrop ;
extern short g_sModelIndexBloodSpray ;
extern short g_sModelIndexSmokePuff ;
extern short g_sModelIndexFireball2 ;
extern short g_sModelIndexFireball3 ;
extern short g_sModelIndexFireball4 ;
extern short g_sModelIndexCTGhost ;
extern short g_sModelIndexTGhost ;
extern short g_sModelIndexC4Glow ;
extern short g_sModelIndexRadio ;
extern MULTIDAMAGE gMultiDamage ;
2015-06-30 12:46:07 +03:00
2016-01-19 14:54:31 +03:00
void FindHullIntersection ( const Vector & vecSrc , TraceResult & tr , float * mins , float * maxs , edict_t * pEntity ) ;
2015-08-02 20:45:57 +03:00
void AnnounceFlashInterval ( float interval , float offset = 0 ) ;
2015-06-30 12:46:07 +03:00
int MaxAmmoCarry ( int iszName ) ;
2016-05-04 00:53:03 +03:00
int MaxAmmoCarry ( const char * szName ) ;
2016-12-06 22:21:52 +03:00
int MaxAmmoCarry ( WeaponIdType ammoType ) ;
2016-05-04 00:53:03 +03:00
2016-02-04 03:18:26 +03:00
void ClearMultiDamage ( ) ;
2015-06-30 12:46:07 +03:00
void ApplyMultiDamage ( entvars_t * pevInflictor , entvars_t * pevAttacker ) ;
void AddMultiDamage ( entvars_t * pevInflictor , CBaseEntity * pEntity , float flDamage , int bitsDamageType ) ;
void SpawnBlood ( Vector vecSpot , int bloodColor , float flDamage ) ;
2016-02-23 02:13:52 +03:00
int DamageDecal ( CBaseEntity * pEntity , int bitsDamageType ) ;
2015-09-16 23:19:21 +03:00
void DecalGunshot ( TraceResult * pTrace , int iBulletType , bool ClientOnly , entvars_t * pShooter , bool bHitMetal ) ;
void EjectBrass ( const Vector & vecOrigin , const Vector & vecLeft , const Vector & vecVelocity , float rotation , int model , int soundtype , int entityIndex ) ;
2016-02-23 02:13:52 +03:00
void EjectBrass2 ( const Vector & vecOrigin , const Vector & vecVelocity , float rotation , int model , int soundtype , entvars_t * pev ) ;
2015-09-16 23:19:21 +03:00
void AddAmmoNameToAmmoRegistry ( const char * szAmmoname ) ;
2015-06-30 12:46:07 +03:00
void UTIL_PrecacheOtherWeapon ( const char * szClassname ) ;
2016-02-23 02:13:52 +03:00
void UTIL_PrecacheOtherWeapon2 ( const char * szClassname ) ;
2016-02-04 03:18:26 +03:00
void W_Precache ( ) ;
2015-09-16 23:19:21 +03:00
BOOL CanAttack ( float attack_time , float curtime , BOOL isPredicted ) ;
2015-06-30 12:46:07 +03:00
# endif // WEAPONS_H