diff --git a/Quake/cl_parse.c b/Quake/cl_parse.c index 602576bc0..506d29461 100644 --- a/Quake/cl_parse.c +++ b/Quake/cl_parse.c @@ -402,7 +402,7 @@ void CL_ParseServerInfo (void) cl.model_precache[i] = Mod_ForName (model_precache[i], false); if (cl.model_precache[i] == NULL) { - Host_Error ("Model %s not found", model_precache[i]); + Con_Warning("Model %s not found.\n", model_precache[i]); // Qmaster -- was Host_Error } CL_KeepaliveMessage (); } diff --git a/Quake/gl_model.c b/Quake/gl_model.c index 6f6048179..67d0e8b72 100644 --- a/Quake/gl_model.c +++ b/Quake/gl_model.c @@ -43,7 +43,7 @@ static int mod_novis_capacity; static byte *mod_decompressed; static int mod_decompressed_capacity; -#define MAX_MOD_KNOWN 2048 /*johnfitz -- was 512 */ +#define MAX_MOD_KNOWN 8192 /*Qmaster -- was 2048. johnfitz -- was 512 */ qmodel_t mod_known[MAX_MOD_KNOWN]; int mod_numknown; @@ -337,7 +337,9 @@ qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash) if (!buf) { if (crash) - Host_Error ("Mod_LoadModel: %s not found", mod->name); //johnfitz -- was "Mod_NumForName" + { + Con_Warning("Mod_LoadModel: %s not found.\n", mod->name); // Qmaster -- was Host_Error. johnfitz -- was "Mod_NumForName" + } return NULL; } @@ -2438,8 +2440,10 @@ void * Mod_LoadAliasFrame (void * pin, maliasframedesc_t *frame) int i; daliasframe_t *pdaliasframe; - if (posenum >= MAXALIASFRAMES) - Sys_Error ("posenum >= MAXALIASFRAMES"); + if (posenum >= MAXALIASFRAMES) { + posenum = MAXALIASFRAMES; // Qmaster -- was Sys_Error, now clamps to max. + // Warning on model load rather than spam here. + } pdaliasframe = (daliasframe_t *)pin; @@ -2503,7 +2507,10 @@ void *Mod_LoadAliasGroup (void * pin, maliasframedesc_t *frame) for (i=0 ; i= MAXALIASFRAMES) Sys_Error ("posenum >= MAXALIASFRAMES"); + if (posenum >= MAXALIASFRAMES) { + posenum = MAXALIASFRAMES; // Qmaster -- was Sys_Error, now clamps to max. + // Warning on model load rather than spam here. + } poseverts[posenum] = (trivertx_t *)((daliasframe_t *)ptemp + 1); posenum++; @@ -2902,6 +2909,14 @@ void Mod_LoadAliasModel (qmodel_t *mod, void *buffer) if (numframes < 1) Sys_Error ("Mod_LoadAliasModel: Invalid # of frames: %d", numframes); + if (numframes > 256) // Qmaster -- Added warning for exceeding standard limits. + { + Con_DWarning("Model %s frame count exceeds standard limit of 256", mod->name); + } + if (numframes > MAXALIASFRAMES) // Qmaster -- Added warning on load for exceeding new limit rather than error out. + { + Con_DWarning("Model %s frame count exceeds limit of %i, frame calls greater than this will be capped at max", mod->name,MAXALIASFRAMES); + } pheader->size = LittleFloat (pinmodel->size) * ALIAS_BASE_SIZE_RATIO; mod->synctype = (synctype_t) LittleLong (pinmodel->synctype); mod->numframes = pheader->numframes; diff --git a/Quake/gl_model.h b/Quake/gl_model.h index 7920087f4..8aecc944f 100644 --- a/Quake/gl_model.h +++ b/Quake/gl_model.h @@ -328,7 +328,7 @@ typedef struct mtriangle_s { } mtriangle_t; -#define MAX_SKINS 32 +#define MAX_SKINS 256 // Qmaster -- was 32 typedef struct { int ident; int version; diff --git a/Quake/quakedef.h b/Quake/quakedef.h index 471e1dd3c..eb4e1ea7e 100644 --- a/Quake/quakedef.h +++ b/Quake/quakedef.h @@ -109,8 +109,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MAX_EDICTS 32000 // johnfitz -- highest allowed value for max_edicts cvar // ents past 8192 can't play sounds in the standard protocol #define MAX_LIGHTSTYLES 64 -#define MAX_MODELS 2048 // johnfitz -- was 256 -#define MAX_SOUNDS 2048 // johnfitz -- was 256 +#define MAX_MODELS 16384 // Qmaster -- was 2048 // johnfitz -- was 256 +#define MAX_SOUNDS 16384 // Qmaster -- was 2048 // johnfitz -- was 256 #define SAVEGAME_COMMENT_LENGTH 39 diff --git a/Quake/snd_dma.c b/Quake/snd_dma.c index 709c1fcf9..a0a704d87 100644 --- a/Quake/snd_dma.c +++ b/Quake/snd_dma.c @@ -64,7 +64,7 @@ int s_rawend; portable_samplepair_t s_rawsamples[MAX_RAW_SAMPLES]; -#define MAX_SFX 1024 +#define MAX_SFX 16384 // Qmaster -- was 1024 static sfx_t *known_sfx = NULL; // hunk allocated [MAX_SFX] static int num_sfx; diff --git a/Quake/snd_mem.c b/Quake/snd_mem.c index 239e020b7..493e92088 100644 --- a/Quake/snd_mem.c +++ b/Quake/snd_mem.c @@ -124,13 +124,13 @@ sfxcache_t *S_LoadSound (sfx_t *s) info = GetWavinfo (s->name, data, com_filesize); if (info.channels != 1) { - Con_Printf ("%s is a stereo sample\n",s->name); + Con_Printf ("%s is a stereo sample, not loaded!\n",s->name); // Qmaster -- clarified why this message is printed return NULL; } if (info.width != 1 && info.width != 2) { - Con_Printf("%s is not 8 or 16 bit\n", s->name); + Con_Printf("%s is not 8 or 16 bit, not loaded!\n", s->name); // Qmaster -- clarified why this message is printed return NULL; } @@ -141,7 +141,7 @@ sfxcache_t *S_LoadSound (sfx_t *s) if (info.samples == 0 || len == 0) { - Con_Printf("%s has zero samples\n", s->name); + Con_Printf("%s has zero samples, not loaded!\n", s->name); // Qmaster -- clarified why this message is printed return NULL; }