Mod_LoadMD3Model: don't load textures on server

This fixes a segfault when -dedicated flag is used
This commit is contained in:
nnnn20430 2019-02-10 05:03:04 +01:00 committed by Shpoike
parent 2567b18924
commit b8442e47ad

View file

@ -629,6 +629,8 @@ void Mod_LoadMD3Model (qmodel_t *mod, void *buffer)
osurf->skinheight = 200;
//load the textures
if (!isDedicated)
{
pinshader = (md3Shader_t*)((byte*)pinsurface + LittleLong(pinsurface->ofsShaders));
osurf->numskins = LittleLong(pinsurface->numShaders);
for (j = 0; j < osurf->numskins; j++, pinshader++)
@ -665,6 +667,7 @@ void Mod_LoadMD3Model (qmodel_t *mod, void *buffer)
osurf->skinwidth = osurf->gltextures[0][0]->source_width;
osurf->skinheight = osurf->gltextures[0][0]->source_height;
}
}
//and figure out the texture coords properly, now we know the actual sizes.
pinst = (md3St_t*)((byte*)pinsurface + LittleLong(pinsurface->ofsSt));