diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/hl2/weapon_molotov.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/hl2/weapon_molotov.h')
| -rw-r--r-- | game/server/hl2/weapon_molotov.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/game/server/hl2/weapon_molotov.h b/game/server/hl2/weapon_molotov.h new file mode 100644 index 0000000..a54f02b --- /dev/null +++ b/game/server/hl2/weapon_molotov.h @@ -0,0 +1,65 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Molotov weapon +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// + +#include "basehlcombatweapon.h" + +#ifndef WEAPON_MOLOTOV_H +#define WEAPON_MOLOTOV_H + +class CGrenade_Molotov; + +class CWeaponMolotov : public CBaseHLCombatWeapon +{ +public: + DECLARE_CLASS( CWeaponMolotov, CBaseHLCombatWeapon ); + + DECLARE_SERVERCLASS(); + +private: + int m_nNumAmmoTypes; + bool m_bNeedDraw; + int m_iThrowBits; // Save the current throw bits state + float m_fNextThrowCheck; // When to check throw ability next + Vector m_vecTossVelocity; + +public: + + void Precache( void ); + void Spawn( void ); + + void DrawAmmo( void ); + + virtual int WeaponRangeAttack1Condition( float flDot, float flDist ); + virtual bool WeaponLOSCondition(const Vector &ownerPos, const Vector &targetPos, bool bSetConditions); + + void SetPickupTouch( void ); + void MolotovTouch( CBaseEntity *pOther ); // default weapon touch + + int CapabilitiesGet( void ) { return bits_CAP_WEAPON_RANGE_ATTACK1; } + + bool ObjectInWay( void ); + + void ThrowMolotov( const Vector &vecSrc, const Vector &vecVelocity); + void ItemPostFrame( void ); + void PrimaryAttack( void ); + void SecondaryAttack( void ); + + void Operator_HandleAnimEvent( animevent_t *pEvent, CBaseCombatCharacter *pOperator ); + + DECLARE_ACTTABLE(); + DECLARE_DATADESC(); + + CWeaponMolotov(void); +}; + +#endif //WEAPON_MOLOTOV_H |