Minor clipping.

This commit is contained in:
Zephaniah E. Hull 2001-05-27 18:35:08 +00:00
parent 9b4f09ff0f
commit 2ab7077e0e
2 changed files with 11 additions and 13 deletions

View file

@ -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_LoadTexture (char *identifier, int width, int height, byte *data, qboolean mipmap, qboolean alpha, int bytesperpixel);
int GL_FindTexture (char *identifier); 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; extern int glx, gly, glwidth, glheight;
#define ALIAS_BASE_SIZE_RATIO (1.0 / 11.0) #define ALIAS_BASE_SIZE_RATIO (1.0 / 11.0)

View file

@ -509,18 +509,24 @@ CL_LinkPacketEntities (void)
if (!model->flags) if (!model->flags)
continue; 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) { if (model->flags & EF_ROCKET) {
dl = R_AllocDlight (-(*ent)->keynum); dl = R_AllocDlight (-(*ent)->keynum);
VectorCopy ((*ent)->origin, dl->origin); VectorCopy ((*ent)->origin, dl->origin);
VectorCopy (r_firecolor->vec, dl->color); VectorCopy (r_firecolor->vec, dl->color);
dl->radius = 200; dl->radius = 200;
dl->die = cl.time + 0.1; 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)); R_RocketTrail (0, (*ent));
} else if (model->flags & EF_GRENADE) else if (model->flags & EF_GRENADE)
R_RocketTrail (1, (*ent)); R_RocketTrail (1, (*ent));
else if (model->flags & EF_GIB) else if (model->flags & EF_GIB)
R_RocketTrail (2, (*ent)); R_RocketTrail (2, (*ent));