mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-10 01:31:14 +00:00
Mod_LoadMD3Model: don't load textures on server
This fixes a segfault when -dedicated flag is used
This commit is contained in:
parent
2567b18924
commit
b8442e47ad
1 changed files with 35 additions and 32 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue