Counter Strike : Global Offensive Source Code
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.
 
 
 
 
 
 

75 lines
1.7 KiB

//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#ifndef PARTICLE_SMOKEGRENADE_H
#define PARTICLE_SMOKEGRENADE_H
#include "baseparticleentity.h"
#define PARTICLESMOKEGRENADE_ENTITYNAME "env_particlesmokegrenade"
#define MIN_SMOKE_TINT 0.5f
#define MAX_SMOKE_TINT 0.6f
class ParticleSmokeGrenade : public CBaseParticleEntity
{
DECLARE_DATADESC();
public:
DECLARE_CLASS( ParticleSmokeGrenade, CBaseParticleEntity );
DECLARE_SERVERCLASS();
ParticleSmokeGrenade();
virtual ~ParticleSmokeGrenade();
virtual void Spawn( void );
virtual int UpdateTransmitState( void );
void SetCreator(CBasePlayer *creator);
CBasePlayer* GetCreator();
public:
// Tell the client entity to start filling the volume.
void FillVolume();
// Set the times it fades out at.
void SetFadeTime(float startTime, float endTime);
// Set time to fade out relative to current time
void SetRelativeFadeTime(float startTime, float endTime);
// Set the tint color of the grenade smoke.
void SetSmokeColor(Vector color);
void Think( void );
public:
// Stage 0 (default): make a smoke trail that follows the entity it's following.
// Stage 1 : fill a volume with smoke.
CNetworkVar( unsigned char, m_CurrentStage );
CNetworkVar( float, m_flSpawnTime );
// When to fade in and out.
CNetworkVar( float, m_FadeStartTime );
CNetworkVar( float, m_FadeEndTime );
CNetworkVar( Vector, m_MinColor );
CNetworkVar( Vector, m_MaxColor );
protected:
EHANDLE m_creatorPlayer;
};
#endif