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/tf/tf_ammo_pack.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/tf/tf_ammo_pack.h')
| -rw-r--r-- | game/server/tf/tf_ammo_pack.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/game/server/tf/tf_ammo_pack.h b/game/server/tf/tf_ammo_pack.h new file mode 100644 index 0000000..ea5d706 --- /dev/null +++ b/game/server/tf/tf_ammo_pack.h @@ -0,0 +1,82 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef TF_AMMO_PACK_H +#define TF_AMMO_PACK_H +#ifdef _WIN32 +#pragma once +#endif + +#include "items.h" + +typedef enum +{ + AP_NORMAL = 0, + AP_HALLOWEEN, + AP_CHRISTMAS, + +} AmmoPackType_t; + +class CTFAmmoPack : public CItem +{ +public: + DECLARE_CLASS( CTFAmmoPack, CItem ); + DECLARE_SERVERCLASS(); + + CTFAmmoPack() + { + m_PackType = AP_NORMAL; + } + + virtual void Spawn(); + virtual void Precache(); + + void EXPORT DropSoundThink( void ); + void EXPORT FlyThink( void ); + void EXPORT PackTouch( CBaseEntity *pOther ); + + void InitWeaponDrop( CTFPlayer *pPlayer, CTFWeaponBase *pWeapon, int nSkin, bool bEmpty, bool bIsSuicide ); + + virtual unsigned int PhysicsSolidMaskForEntity( void ) const; + + int GiveAmmo( int iCount, int iAmmoType ); + + void MakeEmptyPack( void ) { m_bEmptyPack = true; } + void MakeHolidayPack( void ); + void SetBonusScale( float flBonusScale = 1.f ); + void SetPickupThinkTime( float flNewThinkTime ); + + static CTFAmmoPack *Create( const Vector &vecOrigin, const QAngle &vecAngles, CBaseEntity *pOwner, const char *pszModelName ); + + float GetCreationTime( void ) { return m_flCreationTime; } + void SetInitialVelocity( Vector &vecVelocity ); + void SetHealthInstead( bool bHealth ) { m_bHealthInstead = bHealth; } + + const char* MakeHolidayAmmoPack( const char* inModelName, CBaseEntity *pOwner, const CTakeDamageInfo &info ); + + bool m_bObjGib; + +private: + int m_iAmmo[TF_AMMO_COUNT]; + + float m_flCreationTime; + + bool m_bEmptyPack; // If true, the pack gives nothing when picked up. + + bool m_bHealthInstead; // If true, the pack gives health instead of ammo + bool m_bAllowOwnerPickup; + bool m_bNoPickup; + float m_flBonusScale; + AmmoPackType_t m_PackType; + CNetworkVector( m_vecInitialVelocity ); + +private: + CTFAmmoPack( const CTFAmmoPack & ); + + DECLARE_DATADESC(); +}; + +#endif //TF_AMMO_PACK_H
\ No newline at end of file |