From 2ab7077e0e53615e7154620347dbed141094b64c Mon Sep 17 00:00:00 2001 From: "Zephaniah E. Hull" Date: Sun, 27 May 2001 18:35:08 +0000 Subject: [PATCH] Minor clipping. --- include/glquake.h | 8 -------- qw/source/cl_ents.c | 16 +++++++++++----- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/include/glquake.h b/include/glquake.h index 0c5831fe1..b489b5715 100644 --- a/include/glquake.h +++ b/include/glquake.h @@ -58,14 +58,6 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole int GL_LoadTexture (char *identifier, int width, int height, byte *data, qboolean mipmap, qboolean alpha, int bytesperpixel); int GL_FindTexture (char *identifier); -typedef struct { - float x, y, z; - float s, t; - float r, g, b; -} glvert_t; - -extern glvert_t glv; - extern int glx, gly, glwidth, glheight; #define ALIAS_BASE_SIZE_RATIO (1.0 / 11.0) diff --git a/qw/source/cl_ents.c b/qw/source/cl_ents.c index ebe25639a..931fbad03 100644 --- a/qw/source/cl_ents.c +++ b/qw/source/cl_ents.c @@ -509,18 +509,24 @@ CL_LinkPacketEntities (void) if (!model->flags) continue; - // No trail if too far. - if (VectorDistance_fast((*ent)->old_origin, (*ent)->origin) > (256*256)) - VectorCopy ((*ent)->origin, (*ent)->old_origin); - if (model->flags & EF_ROCKET) { dl = R_AllocDlight (-(*ent)->keynum); VectorCopy ((*ent)->origin, dl->origin); VectorCopy (r_firecolor->vec, dl->color); dl->radius = 200; dl->die = cl.time + 0.1; + } + + // No trail if too far. + if (VectorDistance_fast((*ent)->old_origin, (*ent)->origin) > + (256*256)) { + VectorCopy ((*ent)->origin, (*ent)->old_origin); + continue; + } + + if (model->flags & EF_ROCKET) R_RocketTrail (0, (*ent)); - } else if (model->flags & EF_GRENADE) + else if (model->flags & EF_GRENADE) R_RocketTrail (1, (*ent)); else if (model->flags & EF_GIB) R_RocketTrail (2, (*ent));