diff options
author | Tim Angus <tim@ngus.net> | 2002-10-23 00:43:40 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-10-23 00:43:40 +0000 |
commit | 28e5e2f078984294a3430c97223f9508c891fac6 (patch) | |
tree | c4e5218a77cfd3dcb8e6c0e001e4adbfd80bfd24 /src/game/g_misc.c | |
parent | a68abe96d8ab594c220e683da773bd0ac98c01fd (diff) |
* Improved performance of real fading light flares
* Added timed light flares and cg_ to switch between flare types
Diffstat (limited to 'src/game/g_misc.c')
-rw-r--r-- | src/game/g_misc.c | 12 |
1 files changed, 11 insertions, 1 deletions
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; |