source-engine/game/server/tf2base/tf_powerup.h
2022-08-10 19:52:28 +03:00

66 lines
1.3 KiB
C++

//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose: CTF AmmoPack.
//
//=============================================================================//
#ifndef TF_POWERUP_H
#define TF_POWERUP_H
#ifdef _WIN32
#pragma once
#endif
#include "items.h"
enum powerupsize_t
{
POWERUP_SMALL,
POWERUP_MEDIUM,
POWERUP_FULL,
POWERUP_SIZES,
};
extern float PackRatios[POWERUP_SIZES];
//=============================================================================
//
// CTF Powerup class.
//
class CTFPowerup : public CItem
{
public:
DECLARE_CLASS( CTFPowerup, CItem );
CTFPowerup();
void Spawn( void );
CBaseEntity* Respawn( void );
void Materialize( void );
virtual bool ValidTouch( CBasePlayer *pPlayer );
virtual bool MyTouch( CBasePlayer *pPlayer );
bool IsDisabled( void );
void SetDisabled( bool bDisabled );
virtual float GetRespawnDelay( void ) { return g_pGameRules->FlItemRespawnTime( this ); }
// Input handlers
void InputEnable( inputdata_t &inputdata );
void InputDisable( inputdata_t &inputdata );
void InputToggle( inputdata_t &inputdata );
virtual powerupsize_t GetPowerupSize( void ) { return POWERUP_FULL; }
private:
bool m_bDisabled;
bool m_bRespawning;
DECLARE_DATADESC();
};
#endif // TF_POWERUP_H