mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-22 11:41:38 +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))
|
if (!strncmp (mt->name, "sky", 3))
|
||||||
loadmodel->skytexture = tx;
|
loadmodel->skytexture = tx;
|
||||||
|
if (mod_funcs)
|
||||||
mod_funcs->Mod_ProcessTexture (tx);
|
mod_funcs->Mod_ProcessTexture (tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,6 +545,7 @@ Mod_LoadFaces (bsp_t *bsp)
|
||||||
if (!strncmp (out->texinfo->texture->name, "sky", 3)) { // sky
|
if (!strncmp (out->texinfo->texture->name, "sky", 3)) { // sky
|
||||||
out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
|
out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
|
||||||
if (gl_sky_divide && gl_sky_divide->int_val)
|
if (gl_sky_divide && gl_sky_divide->int_val)
|
||||||
|
if (mod_funcs)
|
||||||
mod_funcs->Mod_SubdivideSurface (out);
|
mod_funcs->Mod_SubdivideSurface (out);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -556,7 +558,8 @@ Mod_LoadFaces (bsp_t *bsp)
|
||||||
out->extents[i] = 16384;
|
out->extents[i] = 16384;
|
||||||
out->texturemins[i] = -8192;
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -902,6 +905,7 @@ Mod_LoadBrushModel (model_t *mod, void *buffer)
|
||||||
Mod_LoadEdges (bsp);
|
Mod_LoadEdges (bsp);
|
||||||
Mod_LoadSurfedges (bsp);
|
Mod_LoadSurfedges (bsp);
|
||||||
Mod_LoadTextures (bsp);
|
Mod_LoadTextures (bsp);
|
||||||
|
if (mod_funcs)
|
||||||
mod_funcs->Mod_LoadLighting (bsp);
|
mod_funcs->Mod_LoadLighting (bsp);
|
||||||
Mod_LoadPlanes (bsp);
|
Mod_LoadPlanes (bsp);
|
||||||
Mod_LoadTexinfo (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")) {
|
} else if (strequal (mod->name, "progs/player.mdl")) {
|
||||||
mod->min_light = 0.04;
|
mod->min_light = 0.04;
|
||||||
}
|
}
|
||||||
|
if (mod_funcs)
|
||||||
mod_funcs->Mod_LoadAliasModel (mod, buf, allocator);
|
mod_funcs->Mod_LoadAliasModel (mod, buf, allocator);
|
||||||
break;
|
break;
|
||||||
case IDHEADER_MD2: // Type 8: Quake 2 .md2
|
case IDHEADER_MD2: // Type 8: Quake 2 .md2
|
||||||
// Mod_LoadMD2 (mod, buf, allocator);
|
// Mod_LoadMD2 (mod, buf, allocator);
|
||||||
break;
|
break;
|
||||||
case IDHEADER_SPR: // Type 1: Quake 1 .spr
|
case IDHEADER_SPR: // Type 1: Quake 1 .spr
|
||||||
|
if (mod_funcs)
|
||||||
mod_funcs->Mod_LoadSpriteModel (mod, buf);
|
mod_funcs->Mod_LoadSpriteModel (mod, buf);
|
||||||
break;
|
break;
|
||||||
case IDHEADER_SP2: // Type 2: Quake 2 .sp2
|
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);
|
Mod_LoadBrushModel (mod, buf);
|
||||||
|
|
||||||
if (gl_textures_external->int_val
|
if (gl_textures_external->int_val
|
||||||
&& mod_funcs->Mod_LoadExternalTextures)
|
&& mod_funcs && mod_funcs->Mod_LoadExternalTextures)
|
||||||
mod_funcs->Mod_LoadExternalTextures (mod);
|
mod_funcs->Mod_LoadExternalTextures (mod);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue