Swap normal/vertex order to match order they are accessed in during render.

Optimization from Grievre.
Also fix a minimum light clamping to actually be applied.
This commit is contained in:
Ragnvald Maartmann-Moe IV 2004-04-28 20:27:11 +00:00
parent f81a302c2a
commit f0d9008fa4

View file

@ -67,8 +67,8 @@ static __attribute__ ((unused)) const char rcsid[] =
#include "view.h" #include "view.h"
typedef struct { typedef struct {
vec3_t vert;
vec3_t normal; vec3_t normal;
vec3_t vert;
} blended_vert_t; } blended_vert_t;
typedef struct { typedef struct {
@ -575,8 +575,7 @@ R_DrawAliasModel (entity_t *e)
if (d > 1.0) { if (d > 1.0) {
VectorScale (emission, 1.0 / d, emission); VectorScale (emission, 1.0 / d, emission);
} else if (d < model->min_light && !used_lights) { } else if (d < model->min_light && !used_lights) {
ambientcolor[2] = ambientcolor[1] = emission[2] = emission[1] = emission[0] = model->min_light;
ambientcolor[0] = model->min_light;
} }
qfglMaterialfv (GL_FRONT, GL_EMISSION, emission); qfglMaterialfv (GL_FRONT, GL_EMISSION, emission);