Change light setting from 256 and 200 to 255, for fullbright models.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-05-15 17:38:02 +00:00
parent 40cbc5ed3c
commit dd81f9bf30
2 changed files with 12 additions and 12 deletions

View File

@ -364,8 +364,10 @@ GL_DrawAliasBlendedFrame (aliashdr_t *paliashdr, int pose1, int pose2, float ble
if (!fb) { if (!fb) {
// normals and vertexes come from the frame list // normals and vertexes come from the frame list
// blend the light intensity from the two frames together // blend the light intensity from the two frames together
light = shadelight * ((shadedots[verts1->lightnormalindex] * lerp) light = shadelight * ((shadedots[verts1->lightnormalindex] *
+ (shadedots[verts2->lightnormalindex] * blend)); lerp)
+ (shadedots[verts2->lightnormalindex] *
blend));
glColor4f (shadecolor[0] * light, shadecolor[1] * light, glColor4f (shadecolor[0] * light, shadecolor[1] * light,
shadecolor[2] * light, modelalpha); shadecolor[2] * light, modelalpha);
} }
@ -384,7 +386,6 @@ GL_DrawAliasBlendedFrame (aliashdr_t *paliashdr, int pose1, int pose2, float ble
if (modelalpha != 1.0) if (modelalpha != 1.0)
glDepthMask (GL_TRUE); glDepthMask (GL_TRUE);
glColor3ubv (lighthalf_v); glColor3ubv (lighthalf_v);
} }
@ -642,8 +643,7 @@ R_DrawAliasModel (entity_t *e)
if (cl_dlights[lnum].die >= cl.time) { if (cl_dlights[lnum].die >= cl.time) {
VectorSubtract (currententity->origin, cl_dlights[lnum].origin, VectorSubtract (currententity->origin, cl_dlights[lnum].origin,
dist); dist);
add = add = (cl_dlights[lnum].radius * cl_dlights[lnum].radius * 8) /
(cl_dlights[lnum].radius * cl_dlights[lnum].radius * 8) /
(DotProduct (dist, dist)); // FIXME Deek (DotProduct (dist, dist)); // FIXME Deek
if (add > 0) if (add > 0)
@ -662,7 +662,7 @@ R_DrawAliasModel (entity_t *e)
if (strnequal (clmodel->name, "progs/flame", 11) if (strnequal (clmodel->name, "progs/flame", 11)
|| strnequal (clmodel->name, "progs/bolt", 10)) { || strnequal (clmodel->name, "progs/bolt", 10)) {
modelIsFullbright = true; modelIsFullbright = true;
shadelight = 200; // make certain models full brightness always shadelight = 255; // make certain models full brightness always
} }
shadedots = r_avertexnormal_dots[((int) (e->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1)]; shadedots = r_avertexnormal_dots[((int) (e->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1)];

View File

@ -363,8 +363,10 @@ GL_DrawAliasBlendedFrame (aliashdr_t *paliashdr, int pose1, int pose2, float ble
if (!fb) { if (!fb) {
// normals and vertexes come from the frame list // normals and vertexes come from the frame list
// blend the light intensity from the two frames together // blend the light intensity from the two frames together
light = shadelight * ((shadedots[verts1->lightnormalindex] * lerp) light = shadelight * ((shadedots[verts1->lightnormalindex] *
+ (shadedots[verts2->lightnormalindex] * blend)); lerp)
+ (shadedots[verts2->lightnormalindex] *
blend));
glColor4f (shadecolor[0] * light, shadecolor[1] * light, glColor4f (shadecolor[0] * light, shadecolor[1] * light,
shadecolor[2] * light, modelalpha); shadecolor[2] * light, modelalpha);
} }
@ -383,7 +385,6 @@ GL_DrawAliasBlendedFrame (aliashdr_t *paliashdr, int pose1, int pose2, float ble
if (modelalpha != 1.0) if (modelalpha != 1.0)
glDepthMask (GL_TRUE); glDepthMask (GL_TRUE);
glColor3ubv (lighthalf_v); glColor3ubv (lighthalf_v);
} }
@ -641,8 +642,7 @@ R_DrawAliasModel (entity_t *e)
if (cl_dlights[lnum].die >= cl.time) { if (cl_dlights[lnum].die >= cl.time) {
VectorSubtract (currententity->origin, cl_dlights[lnum].origin, VectorSubtract (currententity->origin, cl_dlights[lnum].origin,
dist); dist);
add = add = (cl_dlights[lnum].radius * cl_dlights[lnum].radius * 8) /
(cl_dlights[lnum].radius * cl_dlights[lnum].radius * 8) /
(DotProduct (dist, dist)); // FIXME Deek (DotProduct (dist, dist)); // FIXME Deek
if (add > 0) if (add > 0)
@ -661,7 +661,7 @@ R_DrawAliasModel (entity_t *e)
if (strnequal (clmodel->name, "progs/flame", 11) if (strnequal (clmodel->name, "progs/flame", 11)
|| strnequal (clmodel->name, "progs/bolt", 10)) { || strnequal (clmodel->name, "progs/bolt", 10)) {
modelIsFullbright = true; modelIsFullbright = true;
shadelight = 256; // make certain models full brightness always shadelight = 255; // make certain models full brightness always
} }
shadedots = r_avertexnormal_dots[((int) (e->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1)]; shadedots = r_avertexnormal_dots[((int) (e->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1)];