From 28e5e2f078984294a3430c97223f9508c891fac6 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 23 Oct 2002 00:43:40 +0000 Subject: * Improved performance of real fading light flares * Added timed light flares and cg_ to switch between flare types --- src/game/g_misc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/game/g_misc.c') diff --git a/src/game/g_misc.c b/src/game/g_misc.c index eac7f2f0..2d35e73c 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -452,12 +452,22 @@ void SP_misc_anim_model( gentity_t *self ) trap_LinkEntity( self ); } -//TA: spawn function for lens flares +//TA: use function for light flares +void SP_use_light_flare( gentity_t *self, gentity_t *other, gentity_t *activator ) +{ + self->s.eFlags ^= EF_NODRAW; +} + +//TA: spawn function for light flares void SP_misc_light_flare( gentity_t *self ) { self->s.eType = ET_LIGHTFLARE; self->s.modelindex = G_ShaderIndex( self->targetShaderName ); VectorCopy( self->pos2, self->s.origin2 ); + self->use = SP_use_light_flare; + + G_SpawnFloat( "speed", "200", &self->speed ); + self->s.time = self->speed; if( self->spawnflags & 1 ) self->s.eFlags |= EF_NODRAW; -- cgit