Explosions are temporarily PURPLE, deal with it.

Made dlight colors RGB as opposed to RGBA, the alpha doesn't make a whole
lot of sense.
This commit is contained in:
Joseph Carter 2000-05-24 23:55:43 +00:00
parent eb38ab097c
commit 82c68a482b
4 changed files with 33 additions and 27 deletions

View file

@ -148,7 +148,7 @@ typedef struct
float die; // stop lighting after this time
float decay; // drop this each second
float minlight; // don't add when contributing less
float color[4];
float color[3]; // Don't use alpha --KB
} dlight_t;
typedef struct

View file

@ -118,26 +118,29 @@ void CL_NewDlight (int key, float x, float y, float z, float radius, float time,
dl->origin[2] = z;
dl->radius = radius;
dl->die = cl.time + time;
if (type == 0) {
dl->color[0] = 0.2;
dl->color[1] = 0.1;
dl->color[2] = 0.05;
dl->color[3] = 0.7;
} else if (type == 1) {
dl->color[0] = 0.05;
dl->color[1] = 0.05;
dl->color[2] = 0.3;
dl->color[3] = 0.7;
} else if (type == 2) {
dl->color[0] = 0.5;
dl->color[1] = 0.05;
dl->color[2] = 0.05;
dl->color[3] = 0.7;
} else if (type == 3) {
dl->color[0]=0.5;
dl->color[1] = 0.05;
dl->color[2] = 0.4;
dl->color[3] = 0.7;
switch (type)
{
default:
case 0:
dl->color[0] = 0.2;
dl->color[1] = 0.1;
dl->color[2] = 0.05;
break;
case 1: // blue
dl->color[0] = 0.05;
dl->color[1] = 0.05;
dl->color[2] = 0.3;
break;
case 2: // red
dl->color[0] = 0.5;
dl->color[1] = 0.05;
dl->color[2] = 0.05;
break;
case 3: // purple
dl->color[0] = 0.5;
dl->color[1] = 0.05;
dl->color[2] = 0.4;
break;
}
}

View file

@ -259,10 +259,14 @@ void CL_ParseTEnt (void)
dl->radius = 350;
dl->die = cl.time + 0.5;
dl->decay = 300;
dl->color[0] = 0.2;
dl->color[1] = 0.1;
dl->color[2] = 0.05;
dl->color[3] = 0.7;
// dl->color[0] = 0.2;
// dl->color[1] = 0.1;
// dl->color[2] = 0.05;
// dl->color[3] = 0.7;
dl->color[0] = 0.8;
dl->color[1] = 0.2;
dl->color[2] = 0.8;
dl->color[3] = 1;
// sound
S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);

View file

@ -147,8 +147,7 @@ void R_RenderDlight (dlight_t *light)
glBegin (GL_TRIANGLE_FAN);
// glColor3f (0.2,0.1,0.0);
// glColor3f (0.2,0.1,0.05); // changed dimlight effect
glColor4f (light->color[0], light->color[1], light->color[2],
light->color[3]);
glColor3fv (light->color);
for (i=0 ; i<3 ; i++)
v[i] = light->origin[i] - vpn[i]*rad;
glVertex3fv (v);