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/tf2/tf_obj_respawn_station.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/tf2/tf_obj_respawn_station.h')
| -rw-r--r-- | game/server/tf2/tf_obj_respawn_station.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/game/server/tf2/tf_obj_respawn_station.h b/game/server/tf2/tf_obj_respawn_station.h new file mode 100644 index 0000000..6290f17 --- /dev/null +++ b/game/server/tf2/tf_obj_respawn_station.h @@ -0,0 +1,70 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Portable respawn station +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef TF_OBJ_RESPAWN_STATION_H +#define TF_OBJ_RESPAWN_STATION_H + +//----------------------------------------------------------------------------- +// forward declarations +//----------------------------------------------------------------------------- +class CBaseEntity; + +//----------------------------------------------------------------------------- +// Respawn station defines +//----------------------------------------------------------------------------- +#define RESPAWN_STATION_MINS Vector(-60, -45, 0) +#define RESPAWN_STATION_MAXS Vector( 60, 45, 140) + +#define RESPAWN_STATION_BUILD_MINS Vector(-60, -45, 0) +#define RESPAWN_STATION_BUILD_MAXS Vector( 60, 40, 140) + +#define RESPAWN_EFFECT_TIME 5.0f +#define RESPAWN_BEAM_HEIGHT 800.0f + +//----------------------------------------------------------------------------- +// Portable respawn station +//----------------------------------------------------------------------------- +class CObjectRespawnStation : public CBaseObject +{ +DECLARE_CLASS( CObjectRespawnStation, CBaseObject ); + +public: + DECLARE_SERVERCLASS(); + DECLARE_DATADESC(); + + CObjectRespawnStation(); + + // Gets called when someone respawns on this station + void PerformRespawnEffect(); + + static CObjectRespawnStation* Create(const Vector &vOrigin, const QAngle &vAngles); + + virtual void Precache(); + virtual void Spawn(); + + virtual bool WantsCover() { return true; } + + // Object using! + virtual void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); + + virtual bool CanTakeEMPDamage( void ) { return false; } + + // Map specified as the initial spawnpoint for a team + bool IsInitialSpawnPoint( void ); + +protected: + float m_fLastRespawnTime; + int m_iSpriteTexture; + bool m_bIsInitialSpawnPoint; +}; + +//----------------------------------------------------------------------------- +// Plays a respawn effect on a respawn station... +//----------------------------------------------------------------------------- +void PlayRespawnEffect(CBaseEntity *pRespawnStation); + +#endif // TF_OBJ_RESPAWN_STATION_H |