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/shared/hl1/hl1mp_weapon_satchel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/hl1/hl1mp_weapon_satchel.h')
| -rw-r--r-- | game/shared/hl1/hl1mp_weapon_satchel.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/game/shared/hl1/hl1mp_weapon_satchel.h b/game/shared/hl1/hl1mp_weapon_satchel.h new file mode 100644 index 0000000..c7ed022 --- /dev/null +++ b/game/shared/hl1/hl1mp_weapon_satchel.h @@ -0,0 +1,107 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef HL1_WEAPON_SATCHEL_H +#define HL1_WEAPON_SATCHEL_H +#ifdef _WIN32 +#pragma once +#endif + + +#ifndef CLIENT_DLL +#include "hl1_basegrenade.h" +#include "hl1_basecombatweapon_shared.h" +#endif + + +#ifdef CLIENT_DLL +#define CWeaponSatchel C_WeaponSatchel +#endif + + +//----------------------------------------------------------------------------- +// CWeaponSatchel +//----------------------------------------------------------------------------- + +class CWeaponSatchel : public CBaseHL1CombatWeapon +{ + DECLARE_CLASS( CWeaponSatchel, CBaseHL1CombatWeapon ); + + DECLARE_NETWORKCLASS(); + DECLARE_PREDICTABLE(); +public: + + CWeaponSatchel( void ); + + void Equip( CBaseCombatCharacter *pOwner ); + bool HasAnyAmmo( void ); + bool CanDeploy( void ); + void Precache( void ); + void PrimaryAttack( void ); + void SecondaryAttack( void ); + void WeaponIdle( void ); + bool Deploy( void ); + bool Holster( CBaseCombatWeapon *pSwitchingTo = NULL ); + + void ItemPostFrame( void ); + const char *GetViewModel( int viewmodelindex = 0 ) const; + const char *GetWorldModel( void ) const; + + bool HasChargeDeployed() { return ( m_iChargeReady != 0 ); } + + void OnRestore( void ); + +// DECLARE_SERVERCLASS(); + DECLARE_DATADESC(); + +private: + void Throw( void ); + void ActivateSatchelModel( void ); + void ActivateRadioModel( void ); + +private: + CNetworkVar( int, m_iRadioViewIndex ); + CNetworkVar( int, m_iRadioWorldIndex ); + CNetworkVar( int, m_iSatchelViewIndex ); + CNetworkVar( int, m_iSatchelWorldIndex ); + CNetworkVar( int, m_iChargeReady ); +}; + + +#ifndef CLIENT_DLL +//----------------------------------------------------------------------------- +// CSatchelCharge +//----------------------------------------------------------------------------- + +class CSatchelCharge : public CHL1BaseGrenade +{ +public: + DECLARE_CLASS( CSatchelCharge, CHL1BaseGrenade ); + + CSatchelCharge(); + + void Spawn( void ); + void Precache( void ); + void SatchelTouch( CBaseEntity *pOther ); + void SatchelThink( void ); + void SatchelUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); + + DECLARE_DATADESC(); + +private: + Vector m_vLastPosition; + float m_flNextBounceSoundTime; + bool m_bInAir; + +private: + void BounceSound( void ); + void UpdateSlideSound( void ); + void Deactivate( void ); +}; +#endif + + +#endif // HL1_WEAPON_SATCHEL_H |