From a32c1af46da71a9cf6c9c44f11cff5597e0f000d Mon Sep 17 00:00:00 2001 From: TimeServ Date: Wed, 21 Dec 2005 08:34:34 +0000 Subject: [PATCH] kill some unnecessary Sys_Errors git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1733 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_demo.c | 6 +++++- engine/client/image.c | 12 ++++++++++-- engine/common/common.c | 5 ++++- engine/gl/glmod_doom.c | 5 ++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index 97ab694bb..6c849b3ac 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -457,7 +457,11 @@ readit: net_message.cursize = LittleLong (net_message.cursize); //Con_Printf("read: %ld bytes\n", net_message.cursize); if (net_message.cursize > MAX_OVERALLMSGLEN) - Sys_Error ("Demo message > MAX_OVERALLMSGLEN"); + { + Con_Printf ("Demo message > MAX_OVERALLMSGLEN\n"); + CL_StopPlayback (); + return 0; + } r = readdemobytes (net_message.data, net_message.cursize); if (r != net_message.cursize) { diff --git a/engine/client/image.c b/engine/client/image.c index 33bd34b0e..e0b929484 100644 --- a/engine/client/image.c +++ b/engine/client/image.c @@ -47,11 +47,19 @@ char *ReadGreyTargaFile (qbyte *data, int flen, tgaheader_t *tgahead, int asgrey if (tgahead->version!=1 && tgahead->version!=3) - Sys_Error ("LoadGrayTGA: Only type 1 and 3 greyscale targa images are understood.\n"); + { + Con_Printf("LoadGrayTGA: Only type 1 and 3 greyscale targa images are understood.\n"); + BZ_Free(pixels); + return NULL; + } if (tgahead->version==1 && tgahead->bpp != 8 && tgahead->cm_size != 24 && tgahead->cm_len != 256) - Sys_Error ("LoadGrayTGA: Strange palette type\n"); + { + Con_Printf("LoadGrayTGA: Strange palette type\n"); + BZ_Free(pixels); + return NULL; + } columns = tgahead->width; rows = tgahead->height; diff --git a/engine/common/common.c b/engine/common/common.c index 07462a646..7489b1540 100644 --- a/engine/common/common.c +++ b/engine/common/common.c @@ -2154,7 +2154,10 @@ void COM_CheckRegistered (void) for (i=0 ; i<128 ; i++) if (pop[i] != (unsigned short)BigShort (check[i])) - Sys_Error ("Corrupted data file."); + { + Con_TPrintf (TL_SHAREWAREVERSION); + return; + } static_registered = true; Con_TPrintf (TL_REGISTEREDVERSION); diff --git a/engine/gl/glmod_doom.c b/engine/gl/glmod_doom.c index a15a7d4a6..add72c642 100644 --- a/engine/gl/glmod_doom.c +++ b/engine/gl/glmod_doom.c @@ -1435,7 +1435,10 @@ qboolean Mod_LoadDoomLevel(model_t *mod) COM_StripExtension(mod->name, name); if (!COM_LoadTempFile(va("%s", mod->name))) - Sys_Error("Wad map %s does not exist\n", mod->name); + { + Con_Printf("Wad map %s does not exist\n", mod->name); + return false; + } gl_nodes = (void *)COM_LoadMallocFile (va("%s.gl_nodes", name)); if (gl_nodes && com_filesize>0)