ports/games/quakeforge/files/patch-libs_models_gl__skin.c
Mathieu Arnold bef73fdbfb Update to 0.7.2
PR:		209296
Submitted by:	tkato432 yahoo com
Sponsored by:	Absolight
2016-05-09 13:43:13 +00:00

30 lines
716 B
C

--- libs/models/gl_skin.c.orig 2013-01-23 03:10:55 UTC
+++ libs/models/gl_skin.c
@@ -230,19 +230,20 @@ gl_Skin_SetupSkin (skin_t *skin, int cma
int changed;
glskin_t *s;
+ skin->texnum = 0;
+ skin->auxtex = 0;
+ if (!cmap) {
+ return;
+ }
// simplify cmap usage (texture offset/array index)
cmap--;
s = skins + cmap;
changed = (s->tex != skin->texels);
s->tex = skin->texels;
if (!changed) {
- skin->texnum = 0;
- skin->auxtex = 0;
- if (cmap >= 0) {
- skin->texnum = skin_textures + cmap;
- if (s->fb)
- skin->auxtex = skin_fb_textures + cmap;
- }
+ skin->texnum = skin_textures + cmap;
+ if (s->fb)
+ skin->auxtex = skin_fb_textures + cmap;
return;
}
if (s->tex)