sp/src/game/server/lab/weapon_custom_flaregun.cpp
CFlareGunProjectile *CFlareGunProjectile::Create(Vector vecOrigin, QAngle vecAngles, CBaseEntity *pOwner, float lifetime)
{
	CFlareGunProjectile *pFlare = (CFlareGunProjectile *)CreateEntityByName("env_flare");

	if (pFlare == NULL)
		return NULL;

	UTIL_SetOrigin(pFlare, vecOrigin);

	pFlare->SetLocalAngles(vecAngles);
	pFlare->Spawn();
	pFlare->SetTouch(&CFlareGunProjectile::FlareGunProjectileTouch);
	pFlare->SetThink(&CFlare::FlareThink);

	//Start up the flare
	pFlare->Start(lifetime);

	//Don't start sparking immediately
	pFlare->SetNextThink(gpGlobals->curtime + 0.5f);

	//Burn out time
	pFlare->m_flTimeBurnOut = gpGlobals->curtime + lifetime;

	// Time to next burn damage
	pFlare->m_flNextDamage = gpGlobals->curtime;


	pFlare->RemoveSolidFlags(FSOLID_NOT_SOLID);
	pFlare->AddSolidFlags(FSOLID_NOT_STANDABLE);

	pFlare->SetMoveType(MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_BOUNCE);

	pFlare->SetOwnerEntity(pOwner);
	pFlare->m_pOwner = pOwner;

	return pFlare;
}
//-----------------------------------------------------------------------------
// Purpose: Create function for Flare Gun projectile
// Input  : vecOrigin - 
//			vecAngles - 
//			*pOwner - 
// Output : CFlare
//-----------------------------------------------------------------------------
Create function for Flare Gun projectile
Input  : vecOrigin
vecAngles
pOwner
Output : CFlare
Create function for Flare Gun projectile Input : vecOrigin vecAngles pOwner Output : CFlare
CFlareGunProjectile *CFlareGunProjectile::Create(Vector vecOrigin, QAngle vecAngles, CBaseEntity *pOwner, float lifetime)
{
	CFlareGunProjectile *pFlare = (CFlareGunProjectile *)CreateEntityByName("env_flare");
	if (pFlare == NULL)
		return NULL;
	UTIL_SetOrigin(pFlare, vecOrigin);
	pFlare->SetLocalAngles(vecAngles);
	pFlare->Spawn();
	pFlare->SetTouch(&CFlareGunProjectile::FlareGunProjectileTouch);
	pFlare->SetThink(&CFlare::FlareThink);
	pFlare->Start(lifetime);
	pFlare->SetNextThink(gpGlobals->curtime + 0.5f);
	pFlare->m_flTimeBurnOut = gpGlobals->curtime + lifetime;
	pFlare->m_flNextDamage = gpGlobals->curtime;
	pFlare->RemoveSolidFlags(FSOLID_NOT_SOLID);
	pFlare->AddSolidFlags(FSOLID_NOT_STANDABLE);
	pFlare->SetMoveType(MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_BOUNCE);
	pFlare->SetOwnerEntity(pOwner);
	pFlare->m_pOwner = pOwner;
	return pFlare;
}
CFlareGunProjectile * CFlareGunProjectile :: Create ( Vector vecOrigin , QAngle vecAngles , CBaseEntity * pOwner , float lifetime ) { CFlareGunProjectile * pFlare = ( CFlareGunProjectile * ) CreateEntityByName ( " " ) ; if ( pFlare == NULL ) return NULL ; UTIL_SetOrigin ( pFlare , vecOrigin ) ; pFlare -> SetLocalAngles ( vecAngles ) ; pFlare -> Spawn ( ) ; pFlare -> SetTouch ( & CFlareGunProjectile :: FlareGunProjectileTouch ) ; pFlare -> SetThink ( & CFlare :: FlareThink ) ; pFlare -> Start ( lifetime ) ; pFlare -> SetNextThink ( gpGlobals -> curtime + 0.5f ) ; pFlare -> m_flTimeBurnOut = gpGlobals -> curtime + lifetime ; pFlare -> m_flNextDamage = gpGlobals -> curtime ; pFlare -> RemoveSolidFlags ( FSOLID_NOT_SOLID ) ; pFlare -> AddSolidFlags ( FSOLID_NOT_STANDABLE ) ; pFlare -> SetMoveType ( MOVETYPE_FLYGRAVITY , MOVECOLLIDE_FLY_BOUNCE ) ; pFlare -> SetOwnerEntity ( pOwner ) ; pFlare -> m_pOwner = pOwner ; return pFlare ; }
Purpose: Create function for Flare Gun projectile
Input  : vecOrigin 
vecAngles 
pOwner 
Output : CFlare
Purpose : Create function for Flare Gun projectile Input : vecOrigin vecAngles pOwner Output : CFlare
//Start up the flare //Don't start sparking immediately //Burn out time // Time to next burn damage