From b1a5aab4f80d9d9905b2eaffa22507520fe24ffb Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 26 Feb 2006 05:49:15 +0000 Subject: [PATCH] Fix a Q3 crash git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2025 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/renderer.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/engine/client/renderer.c b/engine/client/renderer.c index 0b7b0bad8..1f101cce8 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -143,7 +143,7 @@ cvar_t r_shadow_glsl_offsetmapping_bias = SCVAR("r_shadow_glsl_offsetmapping_bia #ifdef SPECULAR cvar_t gl_specular = SCVAR("gl_specular", "0"); #endif -cvar_t gl_lightmapmode = SCVARF("gl_lightmapmode", "", CVAR_ARCHIVE); +//cvar_t gl_lightmapmode = SCVARF("gl_lightmapmode", "", CVAR_ARCHIVE); cvar_t gl_ati_truform = SCVAR("gl_ati_truform", "0"); cvar_t gl_ati_truform_type = SCVAR("gl_ati_truform_type", "1"); @@ -318,7 +318,7 @@ void GLRenderer_Init(void) Cvar_Register (&gl_load24bit, GRAPHICALNICETIES); Cvar_Register (&gl_specular, GRAPHICALNICETIES); - Cvar_Register (&gl_lightmapmode, GLRENDEREROPTIONS); +// Cvar_Register (&gl_lightmapmode, GLRENDEREROPTIONS); #ifdef WATERLAYERS Cvar_Register (&r_waterlayers, GRAPHICALNICETIES); @@ -1672,8 +1672,15 @@ TRACE(("dbg: R_ApplyRenderer: clearing world\n")); #ifdef Q2SERVER else if (svs.gametype == GT_QUAKE2) { - q2ent = ge->edicts; + for (i = 0; i < MAX_MODELS; i++) + { + if (sv.strings.configstring[Q2CS_MODELS+i] && *sv.strings.configstring[Q2CS_MODELS+i] && (!strcmp(sv.strings.configstring[Q2CS_MODELS+i] + strlen(sv.strings.configstring[Q2CS_MODELS+i]) - 4, ".bsp") || i-1 < sv.worldmodel->numsubmodels)) + sv.models[i] = Mod_FindName(sv.strings.configstring[Q2CS_MODELS+i]); + else + sv.models[i] = NULL; + } + q2ent = ge->edicts; for (i=0 ; inum_edicts ; i++, q2ent = (q2edict_t *)((char *)q2ent + ge->edict_size)) { if (!q2ent)