mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Fix some segfaults in server model loading.
I'd forgotten to test the servers when I did the vid_plugin changes.
This commit is contained in:
parent
92c08fb957
commit
6f026e9116
2 changed files with 13 additions and 7 deletions
|
@ -206,6 +206,7 @@ Mod_LoadTextures (bsp_t *bsp)
|
|||
|
||||
if (!strncmp (mt->name, "sky", 3))
|
||||
loadmodel->skytexture = tx;
|
||||
if (mod_funcs)
|
||||
mod_funcs->Mod_ProcessTexture (tx);
|
||||
}
|
||||
|
||||
|
@ -544,6 +545,7 @@ Mod_LoadFaces (bsp_t *bsp)
|
|||
if (!strncmp (out->texinfo->texture->name, "sky", 3)) { // sky
|
||||
out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
|
||||
if (gl_sky_divide && gl_sky_divide->int_val)
|
||||
if (mod_funcs)
|
||||
mod_funcs->Mod_SubdivideSurface (out);
|
||||
continue;
|
||||
}
|
||||
|
@ -556,7 +558,8 @@ Mod_LoadFaces (bsp_t *bsp)
|
|||
out->extents[i] = 16384;
|
||||
out->texturemins[i] = -8192;
|
||||
}
|
||||
mod_funcs->Mod_SubdivideSurface (out); // cut up polygon for warps
|
||||
if (mod_funcs) // cut up polygon for warps
|
||||
mod_funcs->Mod_SubdivideSurface (out);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -902,6 +905,7 @@ Mod_LoadBrushModel (model_t *mod, void *buffer)
|
|||
Mod_LoadEdges (bsp);
|
||||
Mod_LoadSurfedges (bsp);
|
||||
Mod_LoadTextures (bsp);
|
||||
if (mod_funcs)
|
||||
mod_funcs->Mod_LoadLighting (bsp);
|
||||
Mod_LoadPlanes (bsp);
|
||||
Mod_LoadTexinfo (bsp);
|
||||
|
|
|
@ -212,12 +212,14 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
|
|||
} else if (strequal (mod->name, "progs/player.mdl")) {
|
||||
mod->min_light = 0.04;
|
||||
}
|
||||
if (mod_funcs)
|
||||
mod_funcs->Mod_LoadAliasModel (mod, buf, allocator);
|
||||
break;
|
||||
case IDHEADER_MD2: // Type 8: Quake 2 .md2
|
||||
// Mod_LoadMD2 (mod, buf, allocator);
|
||||
break;
|
||||
case IDHEADER_SPR: // Type 1: Quake 1 .spr
|
||||
if (mod_funcs)
|
||||
mod_funcs->Mod_LoadSpriteModel (mod, buf);
|
||||
break;
|
||||
case IDHEADER_SP2: // Type 2: Quake 2 .sp2
|
||||
|
@ -228,7 +230,7 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
|
|||
Mod_LoadBrushModel (mod, buf);
|
||||
|
||||
if (gl_textures_external->int_val
|
||||
&& mod_funcs->Mod_LoadExternalTextures)
|
||||
&& mod_funcs && mod_funcs->Mod_LoadExternalTextures)
|
||||
mod_funcs->Mod_LoadExternalTextures (mod);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue