1
0
Fork 0
forked from fte/fteqw

We flood-fill model skins for compat with vanilla glquake. Turns out glquake had a bug that causes it to only floodfill skin 0, rather than all (non-group) skins, and our behaviour was making hexen2 compat noticably worse.

This commit is contained in:
Shpoike 2023-05-27 18:03:33 +01:00
parent e292e1bbfb
commit 603eb89ca2

View file

@ -3782,7 +3782,7 @@ static void Mod_FloodFillSkin( qbyte *skin, int skinwidth, int skinheight )
int filledcolor = -1;
int i;
if (dpcompat_nofloodfill.ival)
if (dpcompat_nofloodfill.ival || skinwidth > 0x7fffu || skinheight > 0x7fffu)
return;
if (filledcolor == -1)
@ -3856,6 +3856,7 @@ static void *Q1MDL_LoadSkins_GL (galiasinfo_t *galias, dmdl_t *pq1inmodel, model
saved = (qbyte*)(frames+1);
frames[0].texels = saved;
memcpy(saved, pskintype+1, s);
if (i == 0) //Vanilla bug: ONLY skin 0 is flood-filled (the vanilla code operates on a cached 'skin' variable that does NOT get updated between skins reflooding skin 0). We still don't like flood fills either. Hexen2 has the same issue.
Mod_FloodFillSkin(saved, outskin->skinwidth, outskin->skinheight);
}
else