From bbb594019bac8ebd23f7080dda53eabe5c3b37b3 Mon Sep 17 00:00:00 2001 From: "Anton E. Gavrilov" Date: Mon, 31 Jul 2000 12:54:11 +0000 Subject: [PATCH] Change a bunch of Sys_Error()'s to Host_EndGame() --- source/cl_demo.c | 3 ++- source/cl_ents.c | 3 ++- source/cl_parse.c | 6 ++++-- source/cl_tent.c | 3 ++- source/cl_trans.c | 3 ++- source/gl_trans.c | 3 ++- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/source/cl_demo.c b/source/cl_demo.c index b76b981..fd3ea31 100644 --- a/source/cl_demo.c +++ b/source/cl_demo.c @@ -246,7 +246,8 @@ qboolean CL_GetDemoMessage (void) net_message.cursize = LittleLong (net_message.cursize); //Con_Printf("read: %ld bytes\n", net_message.cursize); if (net_message.cursize > MAX_MSGLEN) - Sys_Error ("Demo message > MAX_MSGLEN"); +// Sys_Error ("Demo message > MAX_MSGLEN"); + Host_EndGame ("Demo message > MAX_MSGLEN"); r = fread (net_message.data, net_message.cursize, 1, cls.demofile); if (r != 1) { diff --git a/source/cl_ents.c b/source/cl_ents.c index 4bac67d..bedec33 100644 --- a/source/cl_ents.c +++ b/source/cl_ents.c @@ -773,7 +773,8 @@ void CL_ParsePlayerinfo (void) num = MSG_ReadByte (); if (num > MAX_CLIENTS) - Sys_Error ("CL_ParsePlayerinfo: bad num"); +// Sys_Error ("CL_ParsePlayerinfo: bad num"); + Host_EndGame ("CL_ParsePlayerinfo: bad num"); info = &cl.players[num]; diff --git a/source/cl_parse.c b/source/cl_parse.c index 61317d7..5c86e0e 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -1039,7 +1039,8 @@ void CL_SetStat (int stat, int value) { int j; if (stat < 0 || stat >= MAX_CL_STATS) - Sys_Error ("CL_SetStat: %i is invalid", stat); +// Sys_Error ("CL_SetStat: %i is invalid", stat); + Host_EndGame ("CL_SetStat: %i is invalid", stat); Sbar_Changed (); @@ -1200,7 +1201,8 @@ void CL_ParseServerMessage (void) case svc_lightstyle: i = MSG_ReadByte (); if (i >= MAX_LIGHTSTYLES) - Sys_Error ("svc_lightstyle > MAX_LIGHTSTYLES"); +// Sys_Error ("svc_lightstyle > MAX_LIGHTSTYLES"); + Host_EndGame ("svc_lightstyle > MAX_LIGHTSTYLES"); strcpy (cl_lightstyle[i].map, MSG_ReadString()); cl_lightstyle[i].length = strlen(cl_lightstyle[i].map); break; diff --git a/source/cl_tent.c b/source/cl_tent.c index a432cfc..1065b11 100644 --- a/source/cl_tent.c +++ b/source/cl_tent.c @@ -335,7 +335,8 @@ void CL_ParseTEnt (void) break; default: - Sys_Error ("CL_ParseTEnt: bad type"); +// Sys_Error ("CL_ParseTEnt: bad type"); + Host_EndGame ("CL_ParseTEnt: bad type"); } } diff --git a/source/cl_trans.c b/source/cl_trans.c index 81dde2d..79f1cfa 100644 --- a/source/cl_trans.c +++ b/source/cl_trans.c @@ -52,7 +52,8 @@ void CL_NewTranslation (int slot) char s[512]; if (slot > MAX_CLIENTS) - Sys_Error ("CL_NewTranslation: slot > MAX_CLIENTS"); +// Sys_Error ("CL_NewTranslation: slot > MAX_CLIENTS"); + Host_EndGame ("CL_NewTranslation: slot > MAX_CLIENTS"); player = &cl.players[slot]; diff --git a/source/gl_trans.c b/source/gl_trans.c index 26fda20..cc53aca 100644 --- a/source/gl_trans.c +++ b/source/gl_trans.c @@ -42,7 +42,8 @@ CL_NewTranslation void CL_NewTranslation (int slot) { if (slot > MAX_CLIENTS) - Sys_Error ("CL_NewTranslation: slot > MAX_CLIENTS"); +// Sys_Error ("CL_NewTranslation: slot > MAX_CLIENTS"); + Host_EndGame ("CL_NewTranslation: slot > MAX_CLIENTS"); R_TranslatePlayerSkin(slot); }