bring back the alpha setting for dlights (finally found out what it was

for) and "fix" the wayward dlights in mvds: caused by svc_muzzleflash being
written before the player updates. Should probably fix properly that in the
server too.
This commit is contained in:
Bill Currie 2004-05-03 06:21:39 +00:00
parent 57ffcae9fe
commit 9ed9832789
8 changed files with 33 additions and 19 deletions

View file

@ -400,10 +400,10 @@ CL_NewDlight (int key, vec3_t org, int effects)
float radius;
float time = 0.1;
dlight_t *dl;
static vec3_t normal = {0.4, 0.2, 0.05};
static vec3_t red = {0.5, 0.05, 0.05};
static vec3_t blue = {0.05, 0.05, 0.5};
static vec3_t purple = {0.5, 0.05, 0.5};
static quat_t normal = {0.4, 0.2, 0.05, 0.7};
static quat_t red = {0.5, 0.05, 0.05, 0.7};
static quat_t blue = {0.05, 0.05, 0.5, 0.7};
static quat_t purple = {0.5, 0.05, 0.5, 0.7};
if (!(effects & (EF_BLUE | EF_RED | EF_BRIGHTLIGHT | EF_DIMLIGHT)))
return;
@ -425,16 +425,16 @@ CL_NewDlight (int key, vec3_t org, int effects)
switch (effects & (EF_BLUE | EF_RED)) {
case EF_RED | EF_BLUE:
VectorCopy (purple, dl->color);
QuatCopy (purple, dl->color);
break;
case EF_RED:
VectorCopy (red, dl->color);
QuatCopy (red, dl->color);
break;
case EF_BLUE:
VectorCopy (blue, dl->color);
QuatCopy (blue, dl->color);
break;
default:
VectorCopy (normal, dl->color);
QuatCopy (normal, dl->color);
break;
}
}
@ -598,6 +598,7 @@ CL_RelinkEntities (void)
dl->color[0] = 0.2;
dl->color[1] = 0.1;
dl->color[2] = 0.05;
dl->color[3] = 0.7;
}
}
CL_NewDlight (i, ent->origin, state->effects);
@ -611,6 +612,7 @@ CL_RelinkEntities (void)
dl->radius = 200;
dl->die = cl.time + 0.1;
VectorCopy (r_firecolor->vec, dl->color);
dl->color[3] = 0.7;
}
R_RocketTrail (ent);
} else if (ent->model->flags & EF_GRENADE)

View file

@ -339,6 +339,7 @@ CL_ParseTEnt (void)
dl->color[0] = 1.0;
dl->color[1] = 0.5;
dl->color[2] = 0.25;
dl->color[3] = 0.7;
}
// sound
@ -409,6 +410,7 @@ CL_ParseTEnt (void)
dl->color[0] = vid.palette[colorStart] * (1.0 / 255.0);
dl->color[1] = vid.palette[colorStart + 1] * (1.0 / 255.0);
dl->color[2] = vid.palette[colorStart + 2] * (1.0 / 255.0);
dl->color[3] = 0.7;
break;
case TE_EXPLOSION3: // Nehahra colored light explosion
@ -423,6 +425,7 @@ CL_ParseTEnt (void)
dl->die = cl.time + 0.5;
dl->decay = 300;
VectorCopy (col, dl->color);
dl->color[3] = 0.7;
}
break;