diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 9af22a7b4..832b3e203 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -605,11 +605,6 @@ void Model_NextDownload (void) CL_AllowIndependantSendCmd(false); //stop it now, the indep stuff *could* require model tracing. - -// if (cl.worldmodel->type != mod_brush && cl.worldmodel->type != mod_heightmap) -// Host_EndGame("Worldmodel must be a bsp of some sort\n"); - - Hunk_Check (); // make sure nothing is hurt cl.sendprespawn = true; @@ -696,7 +691,7 @@ int CL_LoadModels(int stage) if (atstage()) { cl.worldmodel = cl.model_precache[1]; - if (!cl.worldmodel) + if (!cl.worldmodel || cl.worldmodel->type == mod_dummy) Host_EndGame("Worldmodel wasn't sent\n"); R_CheckSky(); @@ -713,7 +708,7 @@ int CL_LoadModels(int stage) if (atstage()) { loadmodel = cl.worldmodel; - if (!loadmodel) + if (!loadmodel || loadmodel->type == mod_dummy) Host_EndGame("No worldmodel was loaded\n"); if (R_PreNewMap) @@ -724,7 +719,7 @@ int CL_LoadModels(int stage) if (atstage()) { loadmodel = cl.worldmodel; - if (!loadmodel) + if (!loadmodel || loadmodel->type == mod_dummy) Host_EndGame("No worldmodel was loaded\n"); Mod_NowLoadExternal(); @@ -736,7 +731,7 @@ int CL_LoadModels(int stage) if (atstage()) { loadmodel = cl.worldmodel; - if (!loadmodel) + if (!loadmodel || loadmodel->type == mod_dummy) Host_EndGame("No worldmodel was loaded\n"); R_NewMap (); diff --git a/engine/server/sv_ccmds.c b/engine/server/sv_ccmds.c index 3d9dcafbc..b2972a29e 100644 --- a/engine/server/sv_ccmds.c +++ b/engine/server/sv_ccmds.c @@ -454,7 +454,7 @@ void SV_Map_f (void) return; } - strcpy (level, Cmd_Argv(1)); + Q_strncpyz (level, Cmd_Argv(1), sizeof(level)); startspot = ((Cmd_Argc() == 2)?NULL:Cmd_Argv(2)); waschangelevel = !strcmp(Cmd_Argv(0), "changelevel"); diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 6b4a08e4b..89b5b184b 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -3258,7 +3258,7 @@ void SV_Masterlist_Callback(struct cvar_s *var, char *oldvalue) if (!sv_masterlist[i].cv.name) return; - if (*var->string) + if (!*var->string) { sv_masterlist[i].adr.port = 0; return; diff --git a/engine/sw/d_trans.c b/engine/sw/d_trans.c index b49ab8f6b..f92c85e93 100644 --- a/engine/sw/d_trans.c +++ b/engine/sw/d_trans.c @@ -67,7 +67,7 @@ qbyte Trans(qbyte p, qbyte p2) qbyte AddBlend(qbyte p, qbyte p2) { - int x, y; + unsigned int x, y; x = (srctable[p] + dsttable[p2]); y = x & 0x40100400; // overflow bits