mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-31 06:29:20 +00:00
upload "kind" alien swarm
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@@ -40,6 +40,9 @@ ParticleSmokeGrenade::ParticleSmokeGrenade()
|
||||
m_flSpawnTime = gpGlobals->curtime;
|
||||
}
|
||||
|
||||
ParticleSmokeGrenade::~ParticleSmokeGrenade()
|
||||
{
|
||||
}
|
||||
|
||||
// Smoke grenade particles should always transmitted to clients. If not, a client who
|
||||
// enters the PVS late will see the smoke start billowing from then, allowing better vision.
|
||||
@@ -51,6 +54,23 @@ int ParticleSmokeGrenade::UpdateTransmitState( void )
|
||||
return SetTransmitState( FL_EDICT_ALWAYS );
|
||||
}
|
||||
|
||||
void ParticleSmokeGrenade::Spawn()
|
||||
{
|
||||
BaseClass::Spawn();
|
||||
|
||||
SetNextThink( gpGlobals->curtime );
|
||||
m_creatorPlayer = NULL;
|
||||
}
|
||||
|
||||
void ParticleSmokeGrenade::SetCreator(CBasePlayer *creator)
|
||||
{
|
||||
m_creatorPlayer = creator;
|
||||
}
|
||||
|
||||
CBasePlayer* ParticleSmokeGrenade::GetCreator()
|
||||
{
|
||||
return (CBasePlayer*)m_creatorPlayer.Get();
|
||||
}
|
||||
|
||||
void ParticleSmokeGrenade::FillVolume()
|
||||
{
|
||||
@@ -73,3 +93,19 @@ void ParticleSmokeGrenade::SetRelativeFadeTime(float startTime, float endTime)
|
||||
m_FadeStartTime = flCurrentTime + startTime;
|
||||
m_FadeEndTime = flCurrentTime + endTime;
|
||||
}
|
||||
|
||||
void ParticleSmokeGrenade::Think()
|
||||
{
|
||||
// Override, don't extend. (Baseclass's Think just deletes.)
|
||||
|
||||
float now = gpGlobals->curtime;
|
||||
if( now >= (m_flSpawnTime + m_FadeEndTime) )
|
||||
{
|
||||
// We are done
|
||||
UTIL_Remove(this);
|
||||
return;
|
||||
}
|
||||
|
||||
const float PSG_THINK_DELAY = 1.0f;
|
||||
SetNextThink(now + PSG_THINK_DELAY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user