diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_public.h | 1 | ||||
-rw-r--r-- | src/game/g_misc.c | 10 | ||||
-rw-r--r-- | src/game/g_spawn.c | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h index f5e5cef1..e4fd3704 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -1011,6 +1011,7 @@ typedef enum { ET_CORPSE, ET_SPRITER, ET_ANIMMAPOBJ, + ET_LENSFLARE, ET_EVENTS // any of the EV_* events can be added freestanding // by setting eType to ET_EVENTS + eventNum diff --git a/src/game/g_misc.c b/src/game/g_misc.c index 03530500..b6711afd 100644 --- a/src/game/g_misc.c +++ b/src/game/g_misc.c @@ -459,3 +459,13 @@ void SP_misc_anim_model( gentity_t *self ) trap_LinkEntity( self ); } + +//TA: spawn function for lens flares +void SP_misc_lens_flare( gentity_t *self ) +{ + self->s.eType = ET_LENSFLARE; + self->s.modelindex = G_ShaderIndex( self->targetShaderName ); + VectorCopy( self->pos2, self->s.origin2 ); + + trap_LinkEntity( self ); +} diff --git a/src/game/g_spawn.c b/src/game/g_spawn.c index 101a1acb..f3afeb12 100644 --- a/src/game/g_spawn.c +++ b/src/game/g_spawn.c @@ -215,6 +215,7 @@ void SP_team_CTF_bluespawn( gentity_t *ent ); //TA: void SP_misc_spriter( gentity_t *ent ); void SP_misc_anim_model( gentity_t *ent ); +void SP_misc_lens_flare( gentity_t *ent ); spawn_t spawns[] = { // info entities don't do anything at all, but provide positional @@ -289,6 +290,7 @@ spawn_t spawns[] = { {"misc_spriter", SP_misc_spriter}, {"misc_anim_model", SP_misc_anim_model}, + {"misc_lens_flare", SP_misc_lens_flare}, {0, 0} }; |