From ea77bed623dfe7c038501851b83dda30452d3796 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 25 Feb 2024 14:44:42 +0900 Subject: [PATCH] [skin] Fix weird fullbrights on gl models All due to uninitialized data. --- libs/models/gl_skin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/models/gl_skin.c b/libs/models/gl_skin.c index f4dab443c..bfd19d026 100644 --- a/libs/models/gl_skin.c +++ b/libs/models/gl_skin.c @@ -163,6 +163,7 @@ gl_Skin_Get (const tex_t *tex, const colormap_t *colormap, skin_counts[ind]++; sp->tex = tex; + sp->skin = (glskin_t) {}; auto build_skin = vid.is8bit ? build_skin_8 : build_skin_32; @@ -184,7 +185,7 @@ gl_Skin_Get (const tex_t *tex, const colormap_t *colormap, byte palette[256]; Skin_SetPalette (palette, top, bot); qfglGenTextures (1, &sp->skin.id); - build_skin_32 (&wtex, sp->skin.id, palette, swidth, sheight, false); + build_skin (&wtex, sp->skin.id, palette, swidth, sheight, false); int size = wtex.width * wtex.height; byte fbskin[size];