You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.4 KiB
69 lines
1.4 KiB
![]()
4 years ago
|
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||
|
//
|
||
|
// TF Generic Bomb
|
||
|
//
|
||
|
//=============================================================================
|
||
|
#ifndef TF_GENERIC_BOMB_H
|
||
|
#define TF_GENERIC_BOMB_H
|
||
|
#ifdef _WIN32
|
||
|
#pragma once
|
||
|
#endif
|
||
|
|
||
|
#ifdef CLIENT_DLL
|
||
|
#define CTFGenericBomb C_TFGenericBomb
|
||
|
#endif
|
||
|
|
||
|
class CTFGenericBombShim : public CBaseAnimating
|
||
|
{
|
||
|
virtual void GenericTouch( CBaseEntity *pOther ) = 0;
|
||
|
public:
|
||
|
void Touch( CBaseEntity *pOther ) { return GenericTouch( pOther ) ; }
|
||
|
};
|
||
|
|
||
|
DECLARE_AUTO_LIST( ITFGenericBomb );
|
||
|
|
||
|
class CTFGenericBomb : public CTFGenericBombShim, public ITFGenericBomb
|
||
|
{
|
||
|
DECLARE_CLASS( CTFGenericBomb, CBaseAnimating );
|
||
|
DECLARE_NETWORKCLASS();
|
||
|
|
||
|
enum EWhoToDamage
|
||
|
{
|
||
|
DAMAGE_ATTACKER_AND_ATTACKER_ENEMIES,
|
||
|
DAMAGE_EVERYONE
|
||
|
};
|
||
|
|
||
|
public:
|
||
|
CTFGenericBomb();
|
||
|
~CTFGenericBomb() {}
|
||
|
|
||
|
virtual void Precache( void );
|
||
|
virtual void Spawn( void );
|
||
|
virtual void GenericTouch( CBaseEntity *pOther ) OVERRIDE;
|
||
|
|
||
|
#ifdef GAME_DLL
|
||
|
DECLARE_DATADESC();
|
||
|
|
||
|
virtual void Event_Killed( const CTakeDamageInfo &info );
|
||
|
#endif
|
||
|
|
||
|
private:
|
||
|
#ifdef GAME_DLL
|
||
|
void Detonate( inputdata_t& inputdata );
|
||
|
COutputEvent m_OnDetonate;
|
||
|
#endif
|
||
|
|
||
|
bool m_bDead;
|
||
|
bool m_bPrecached;
|
||
|
|
||
|
int m_iTeam;
|
||
|
float m_flDamage;
|
||
|
int m_nHealth;
|
||
|
float m_flRadius;
|
||
|
string_t m_strExplodeParticleName;
|
||
|
string_t m_strHitParticleName;
|
||
|
string_t m_strExplodeSoundName;
|
||
|
EWhoToDamage m_eWhoToDamage;
|
||
|
};
|
||
|
|
||
|
#endif //TF_GENERIC_BOMB_H
|