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_energy_ball.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_energy_ball.h')
| -rw-r--r-- | game/server/tf/tf_projectile_energy_ball.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/game/server/tf/tf_projectile_energy_ball.h b/game/server/tf/tf_projectile_energy_ball.h new file mode 100644 index 0000000..edbb0c6 --- /dev/null +++ b/game/server/tf/tf_projectile_energy_ball.h @@ -0,0 +1,76 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// TF Energy Ball Projectile +// +//============================================================================= +#ifndef TF_PROJECTILE_ENERGY_BALL_H +#define TF_PROJECTILE_ENERGY_BALL_H +#ifdef _WIN32 +#pragma once +#endif + +#include "tf_player.h" +#include "tf_weaponbase_rocket.h" +#include "iscorer.h" + +class CTFProjectile_EnergyBall : public CTFBaseRocket//, public IScorer +{ +public: + + DECLARE_CLASS( CTFProjectile_EnergyBall, CTFBaseRocket ); + DECLARE_NETWORKCLASS(); + DECLARE_DATADESC(); + + CTFProjectile_EnergyBall(); + ~CTFProjectile_EnergyBall(); + + // Creation. + static CTFProjectile_EnergyBall *Create( const Vector &vecOrigin, const QAngle &vecAngles, const float fSpeed, const float fGravity, CBaseEntity *pOwner = NULL, CBaseEntity *pScorer = NULL ); + virtual void InitEnergyBall( const Vector &vecOrigin, const QAngle &vecAngles, const float fSpeed, const float fGravity, CBaseEntity *pOwner = NULL, CBaseEntity *pScorer = NULL ); + virtual void Spawn(); + virtual void Precache(); + virtual int GetWeaponID( void ) const { return TF_WEAPON_PARTICLE_CANNON; } + + // IScorer interface + virtual CBasePlayer *GetScorer( void ); + virtual CBasePlayer *GetAssistant( void ) { return NULL; } + + void SetScorer( CBaseEntity *pScorer ); + void SetCritical( bool bCritical ) { m_bCritical = bCritical; } + + virtual bool CanHeadshot() { return false; } + + void ImpactSound( const char *pszSoundName, bool bLoudForAttacker = false ); + virtual void ImpactTeamPlayer( CTFPlayer *pOther ) {} + + void FadeOut( int iTime ); + void RemoveThink(); + + virtual float GetDamage(); + virtual int GetDamageCustom(); + virtual int GetDamageType(); + + virtual bool IsDeflectable() { return true; } + virtual void Deflected( CBaseEntity *pDeflectedBy, Vector &vecDir ); + + void SetChargedShot( bool bCharged ) { m_bChargedShot = bCharged; } + + virtual void Explode( trace_t *pTrace, CBaseEntity *pOther ); + + void SetColor( int idx, Vector vColor ) { if ( idx==1 ) m_vColor1=vColor; else m_vColor2=vColor; } + const char *GetExplosionParticleName( void ); + +private: + + CBaseHandle m_Scorer; + + CNetworkVar( bool, m_bChargedShot ); + + CNetworkVector( m_vColor1 ); + CNetworkVector( m_vColor2 ); + +protected: + float m_flInitTime; +}; + +#endif //TF_PROJECTILE_ENERGY_BALL_H
\ No newline at end of file |