make r_wateralpha actually do something :)

This commit is contained in:
Bill Currie 2000-10-05 04:40:16 +00:00
parent 9b6a9a59b2
commit 0a8dc3c98f

View file

@ -637,7 +637,13 @@ void GL_WaterSurface(msurface_t *s)
if (r_wateralpha->value < 1.0) if (r_wateralpha->value < 1.0)
{ {
glDepthMask(GL_FALSE); glDepthMask(GL_FALSE);
if (lighthalf) {
glColor4f(0.5,0.5,0.5,r_wateralpha->value);
} else {
glColor4f(1,1,1,r_wateralpha->value);
}
EmitWaterPolys (s); EmitWaterPolys (s);
glColor3ubv(lighthalf_v);
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
} }
else else
@ -661,8 +667,14 @@ void R_DrawWaterSurfaces (void)
glLoadMatrixf (r_world_matrix); glLoadMatrixf (r_world_matrix);
if (r_wateralpha->value < 1.0) if (r_wateralpha->value < 1.0) {
glDepthMask(GL_FALSE); glDepthMask(GL_FALSE);
if (lighthalf) {
glColor4f(0.5,0.5,0.5,r_wateralpha->value);
} else {
glColor4f(1,1,1,r_wateralpha->value);
}
}
i = -1; i = -1;
for (s = waterchain;s;s = s->texturechain) for (s = waterchain;s;s = s->texturechain)
@ -677,8 +689,10 @@ void R_DrawWaterSurfaces (void)
waterchain = NULL; waterchain = NULL;
if (r_wateralpha->value < 1.0) if (r_wateralpha->value < 1.0) {
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
glColor3ubv(lighthalf_v);
}
} }