Fix for colourless models after a vid_restart (or a flush, it turns out)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1099 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e5b76314ac
commit
2c5eeb9fa4
1 changed files with 10 additions and 10 deletions
|
@ -2224,13 +2224,14 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
|
|||
}
|
||||
}
|
||||
|
||||
texnums = Hunk_Alloc(sizeof(*texnums)+s);
|
||||
saved = (qbyte*)(texnums+1);
|
||||
outskin->ofstexels = (qbyte *)(saved) - (qbyte *)outskin;
|
||||
memcpy(saved, pskintype+1, s);
|
||||
GLMod_FloodFillSkin(saved, outskin->skinwidth, outskin->skinheight);
|
||||
|
||||
if (!texture)
|
||||
{
|
||||
texnums = Hunk_Alloc(sizeof(*texnums)+s);
|
||||
saved = (qbyte*)(texnums+1);
|
||||
outskin->ofstexels = (qbyte *)(saved) - (qbyte *)outskin;
|
||||
memcpy(saved, pskintype+1, s);
|
||||
GLMod_FloodFillSkin(saved, outskin->skinwidth, outskin->skinheight);
|
||||
sprintf(skinname, "%s_%i", loadname, i);
|
||||
texture = GL_LoadTexture(skinname, outskin->skinwidth, outskin->skinheight, saved, true, alpha);
|
||||
if (r_fb_models.value)
|
||||
|
@ -2239,11 +2240,6 @@ static void *Q1_LoadSkins (daliasskintype_t *pskintype, qboolean alpha)
|
|||
fbtexture = GL_LoadTextureFB(skinname, outskin->skinwidth, outskin->skinheight, saved, true, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
texnums = Hunk_Alloc(sizeof(*texnums));
|
||||
outskin->ofstexels = 0;
|
||||
}
|
||||
outskin->texnums=1;
|
||||
|
||||
outskin->ofstexnums = (char *)texnums - (char *)outskin;
|
||||
|
@ -3474,6 +3470,10 @@ void GLMod_LoadZymoticModel(model_t *mod, void *buffer)
|
|||
if (!header->numsurfaces)
|
||||
Sys_Error("GLMod_LoadZymoticModel: no surfaces\n");
|
||||
|
||||
|
||||
VectorCopy(header->mins, mod->mins);
|
||||
VectorCopy(header->maxs, mod->maxs);
|
||||
|
||||
root = Hunk_AllocName(sizeof(galiasinfo_t)*header->numsurfaces, loadname);
|
||||
|
||||
root->numtransforms = header->lump_verts.length/sizeof(zymvertex_t);
|
||||
|
|
Loading…
Reference in a new issue