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_projectile_rocket.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_projectile_rocket.h')
| -rw-r--r-- | game/server/tf/tf_projectile_rocket.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/game/server/tf/tf_projectile_rocket.h b/game/server/tf/tf_projectile_rocket.h new file mode 100644 index 0000000..18b7738 --- /dev/null +++ b/game/server/tf/tf_projectile_rocket.h @@ -0,0 +1,60 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// TF Rocket Projectile +// +//============================================================================= +#ifndef TF_PROJECTILE_ROCKET_H +#define TF_PROJECTILE_ROCKET_H +#ifdef _WIN32 +#pragma once +#endif + +#include "tf_weaponbase_rocket.h" +#include "iscorer.h" + + +//============================================================================= +// +// Generic rocket. +// +class CTFProjectile_Rocket : public CTFBaseRocket, public IScorer +{ +public: + + DECLARE_CLASS( CTFProjectile_Rocket, CTFBaseRocket ); + DECLARE_NETWORKCLASS(); + + // Creation. + static CTFProjectile_Rocket *Create( CBaseEntity *pLauncher, const Vector &vecOrigin, const QAngle &vecAngles, CBaseEntity *pOwner = NULL, CBaseEntity *pScorer = NULL ); + virtual void Spawn(); + virtual void Precache(); + virtual void RocketTouch( CBaseEntity *pOther ) OVERRIDE; + + // IScorer interface + virtual CBasePlayer *GetScorer( void ); + virtual CBasePlayer *GetAssistant( void ) { return NULL; } + + void SetScorer( CBaseEntity *pScorer ); + + void SetCritical( bool bCritical ) { m_bCritical = bCritical; } + bool IsCritical() { return m_bCritical; } + virtual int GetDamageType(); + virtual int GetDamageCustom(); + virtual bool IsDeflectable() { return true; } + virtual void Deflected( CBaseEntity *pDeflectedBy, Vector &vecDir ); + + void SetDirectHit( bool bDirectHit ){ m_bDirectHit = bDirectHit; } + virtual int GetWeaponID( void ) const { return ( m_bDirectHit ? TF_WEAPON_ROCKETLAUNCHER_DIRECTHIT : TF_WEAPON_ROCKETLAUNCHER ); } + + void SetEyeBallRocket( bool state ){ m_bEyeBallRocket = state; } + void SetSpell( bool bSpell ) { m_bSpell = bSpell; } + +private: + CBaseHandle m_Scorer; + CNetworkVar( bool, m_bCritical ); + bool m_bDirectHit; + bool m_bEyeBallRocket; + bool m_bSpell; +}; + +#endif //TF_PROJECTILE_ROCKET_H
\ No newline at end of file |