Fix some Q2 issues.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5659 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2d1699985f
commit
11e41f1e7d
8 changed files with 33 additions and 15 deletions
|
@ -1393,6 +1393,11 @@ static int CL_LoadModels(int stage, qboolean dontactuallyload)
|
|||
if (cl.worldmodel && cl.worldmodel->loadstate == MLS_LOADING)
|
||||
return -1;
|
||||
|
||||
#ifdef Q2CLIENT
|
||||
if (cl.worldmodel && cl.worldmodel->checksum != cl.q2mapchecksum)
|
||||
Host_EndGame("Local map version differs from server: %i != '%i'\n", cl.worldmodel->checksum, cl.q2mapchecksum);
|
||||
#endif
|
||||
|
||||
SCR_SetLoadingFile("csprogs world");
|
||||
|
||||
#ifdef CSQC_DAT
|
||||
|
@ -4517,18 +4522,20 @@ static void CLQ2_ParseConfigString (void)
|
|||
}
|
||||
else if (i == Q2CS_MAPCHECKSUM)
|
||||
{
|
||||
int serverchecksum = atoi(s);
|
||||
int serverchecksum = (int)strtol(s, NULL, 10);
|
||||
int mapchecksum = 0;
|
||||
|
||||
if (cl.worldmodel)
|
||||
{
|
||||
if (cl.worldmodel->loadstate == MLS_LOADING)
|
||||
COM_WorkerPartialSync(cl.worldmodel, &cl.worldmodel->loadstate, MLS_LOADING);
|
||||
mapchecksum = cl.worldmodel->checksum;
|
||||
|
||||
// the Q2 client normally exits here, however for our purposes we might as well ignore it
|
||||
if (mapchecksum != serverchecksum)
|
||||
Con_Printf(CON_WARNING "WARNING: Client checksum does not match server checksum (%i != %i)", mapchecksum, serverchecksum);
|
||||
}
|
||||
// the Q2 client normally exits here, however for our purposes we might as well ignore it
|
||||
if (mapchecksum != serverchecksum)
|
||||
Con_Printf(CON_WARNING "WARNING: Client checksum does not match server checksum (%i != %i)", mapchecksum, serverchecksum);
|
||||
|
||||
cl.q2mapchecksum = serverchecksum;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -941,6 +941,7 @@ typedef struct
|
|||
char q2airaccel[16];
|
||||
char q2statusbar[1024];
|
||||
char q2layout[MAX_SPLITS][1024];
|
||||
int q2mapchecksum;
|
||||
int parse_entities;
|
||||
float lerpfrac;
|
||||
float q2svnetrate; //number of frames we expect to receive per second (required to calculate the server time correctly).
|
||||
|
|
|
@ -33,7 +33,7 @@ static void QDECL R_Image_BuggyCvar (struct cvar_s *var, char *oldvalue)
|
|||
if (!*var->string)
|
||||
var->ival = var->value = true;
|
||||
}
|
||||
cvar_t r_keepimages = CVARCD("r_keepimages", "", R_Image_BuggyCvar, "Retain unused images in memory for slightly faster map loading. FIXME: a setting of 0 may be crashy! (empty is treated as 1 for now)");
|
||||
cvar_t r_keepimages = CVARCD("r_keepimages", "", R_Image_BuggyCvar, "Retain unused images in memory for slightly faster map loading. FIXME: a setting of 0 may be crashy! (empty is treated as 1 for now).\n0: Redundant images will be purged after each map change.\n1: Images will be retained until vid_reload (potentially consuming a lot of ram).");
|
||||
cvar_t r_ignoremapprefixes = CVARCD("r_ignoremapprefixes", "", R_Image_BuggyCvar, "Ignores when textures were loaded from map-specific paths. FIXME: empty is currently interpretted as 1 because the alternative is too memory hungary with r_keepimages 1.");
|
||||
|
||||
char *r_defaultimageextensions =
|
||||
|
|
|
@ -209,7 +209,9 @@ static int downloadablessequence; //bumped any time any package is purged
|
|||
|
||||
static void PM_WriteInstalledPackages(void);
|
||||
static void PM_PreparePackageList(void);
|
||||
#ifdef WEBCLIENT
|
||||
static qboolean PM_SignatureOkay(package_t *p);
|
||||
#endif
|
||||
|
||||
static void PM_FreePackage(package_t *p)
|
||||
{
|
||||
|
@ -1601,10 +1603,10 @@ static qboolean PM_MarkPackage(package_t *package, unsigned int markflag)
|
|||
package->flags &= ~DPF_PURGE;
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
if (!PM_SignatureOkay(package))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
//any file-conflicts prevent the package from being installable.
|
||||
//this is mostly for pak1.pak
|
||||
|
@ -3661,8 +3663,10 @@ static void MD_Draw (int x, int y, struct menucustom_s *c, struct emenu_s *m)
|
|||
|
||||
if (!PM_CheckPackageFeatures(p))
|
||||
Draw_FunStringWidth(0, y, "!", x+8, true, true);
|
||||
#ifdef WEBCLIENT
|
||||
if (!PM_SignatureOkay(p))
|
||||
Draw_FunStringWidth(0, y, "^b!", x+8, true, true);
|
||||
#endif
|
||||
|
||||
// if (!(p->flags & (DPF_ENABLED|DPF_MARKED|DPF_PRESENT))
|
||||
// continue;
|
||||
|
@ -3912,6 +3916,7 @@ static int MD_AddItemsToDownloadMenu(emenu_t *m, int y, const char *pathprefix)
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef WEBCLIENT
|
||||
if (!PM_SignatureOkay(p))
|
||||
{
|
||||
if (!p->signature)
|
||||
|
@ -3923,6 +3928,7 @@ static int MD_AddItemsToDownloadMenu(emenu_t *m, int y, const char *pathprefix)
|
|||
else
|
||||
head = va(CON_ERROR"Unable to verify signature"CON_DEFAULT"\n%s", head?head:""); //clientside problem.
|
||||
}
|
||||
#endif
|
||||
|
||||
if (head && desc)
|
||||
desc = va("%s\n%s", head, desc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue