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/tf2/weapon_flame_thrower.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/tf2/weapon_flame_thrower.h')
| -rw-r--r-- | game/shared/tf2/weapon_flame_thrower.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/game/shared/tf2/weapon_flame_thrower.h b/game/shared/tf2/weapon_flame_thrower.h new file mode 100644 index 0000000..f2700e2 --- /dev/null +++ b/game/shared/tf2/weapon_flame_thrower.h @@ -0,0 +1,95 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef WEAPON_FLAME_THROWER_H +#define WEAPON_FLAME_THROWER_H +#ifdef _WIN32 +#pragma once +#endif + +#include "weapon_combat_usedwithshieldbase.h" + +#if defined( CLIENT_DLL ) + #define CWeaponFlameThrower C_WeaponFlameThrower + + #include "particlemgr.h" + #include "particle_util.h" + #include "particles_simple.h" + +#else + + class CGasolineBlob; + +#endif + +//========================================================= +// Medikit Weapon +//========================================================= +class CWeaponFlameThrower : public CWeaponCombatUsedWithShieldBase +{ + DECLARE_CLASS( CWeaponFlameThrower, CWeaponCombatUsedWithShieldBase ); +public: + DECLARE_NETWORKCLASS(); + DECLARE_PREDICTABLE(); + + CWeaponFlameThrower(); + CWeaponFlameThrower( bool bCanister ); + ~CWeaponFlameThrower(); + + virtual void Precache(); + + // The gas canister says yes so we can do different things. + bool IsGasCanister() const; + + // All predicted weapons need to implement and return true + virtual bool IsPredicted( void ) const; + virtual void ItemPostFrame(); + + +#if defined( CLIENT_DLL ) + + virtual bool ShouldPredict( void ); + + virtual void NotifyShouldTransmit( ShouldTransmitState_t state ); + virtual void ClientThink(); + + // Start/stop the fire sound. + void StartSound(); + void StopFlameSound(); + bool m_bSoundOn; // Is the sound on? + + CSmartPtr<CSimpleEmitter> m_hFlameEmitter; + PMaterialHandle m_hFireMaterial; + TimedEvent m_FlameEvent; + +#else + + virtual bool Holster( CBaseCombatWeapon *pSwitchingTo ); + void IgniteNearbyGasolineBlobs(); + +private: + + // Used to link the blobs together. + CHandle<CGasolineBlob> m_hPrevBlob; + + +#endif + + +private: + + void PrimaryAttack(); + void InternalConstructor( bool bCanister ); + + CNetworkVar( bool, m_bFiring ); + bool m_bCanister; // Tells if we're a gas canister or a flamethrower (both act in similar ways). + float m_flNextPrimaryAttack; + + CWeaponFlameThrower( const CWeaponFlameThrower & ); +}; + +#endif // WEAPON_FLAME_THROWER_H |