From 98e24f6b7298643a5e6cde575bce2c07966f75f6 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Thu, 25 Apr 2013 19:25:56 +0930 Subject: [PATCH] model: fix light vertex for lerped alias model case Signed-off-by: Kevin Shanahan --- common/gl_rmain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gl_rmain.c b/common/gl_rmain.c index 008fb0f..bc6b530 100644 --- a/common/gl_rmain.c +++ b/common/gl_rmain.c @@ -425,7 +425,6 @@ GL_AliasDrawModel(const entity_t *entity, float blend) aliashdr_t *aliashdr; const trivertx_t *vertbase, *verts1; const int *order; - float light; int count; lastposenum = entity->currentpose; @@ -467,6 +466,7 @@ GL_AliasDrawModel(const entity_t *entity, float blend) if (r_fullbright.value) { glColor3f(255.0f, 255.0f, 255.0f); } else { + float light; light = shadedots[lightvert->lightnormalindex] * shadelight; glColor3f(light, light, light); } @@ -476,7 +476,7 @@ GL_AliasDrawModel(const entity_t *entity, float blend) glVertex3f(glvertex[0], glvertex[1], glvertex[2]); verts0++; verts1++; - light++; + lightvert++; } glEnd(); } @@ -500,7 +500,7 @@ GL_AliasDrawModel(const entity_t *entity, float blend) order += 2; /* normals and vertexes come from the frame list */ - light = shadedots[verts1->lightnormalindex] * shadelight; + float light = shadedots[verts1->lightnormalindex] * shadelight; glColor3f(light, light, light); glVertex3f(verts1->v[0], verts1->v[1], verts1->v[2]); verts1++;