mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
bring forward the sv_extentions and stdver changes from 0.3
This commit is contained in:
parent
a046592741
commit
e27878e156
4 changed files with 22 additions and 13 deletions
|
@ -255,7 +255,7 @@ typedef struct
|
|||
char levelname[40]; // for display on solo scoreboard
|
||||
int playernum;
|
||||
int viewentity;
|
||||
int stdver;
|
||||
float stdver;
|
||||
|
||||
// refresh related state
|
||||
struct model_s *worldmodel; // cl_entitites[0].model
|
||||
|
|
|
@ -222,7 +222,7 @@ typedef struct client_s
|
|||
int msecs, msec_cheating;
|
||||
double last_check;
|
||||
double cuff_time;
|
||||
int stdver;
|
||||
float stdver;
|
||||
} client_t;
|
||||
|
||||
// a client can leave the server in one of four ways:
|
||||
|
|
|
@ -585,19 +585,19 @@ CL_FullServerinfo_f (void)
|
|||
|
||||
if ((p = Info_ValueForKey (cl.serverinfo, "*qf_version")) && *p) {
|
||||
if (server_version == NULL)
|
||||
Con_Printf ("QuakeForge Version %s Server\n", p);
|
||||
Con_Printf ("QuakeForge v%s Server\n", p);
|
||||
server_version = strdup (p);
|
||||
} else if ((p = Info_ValueForKey (cl.serverinfo, "*version")) && *p) {
|
||||
if (server_version == NULL)
|
||||
Con_Printf ("Version %s Server\n", p);
|
||||
Con_Printf ("QaukeWorld v%s Server\n", p);
|
||||
server_version = strdup (p);
|
||||
}
|
||||
|
||||
if ((p = Info_ValueForKey (cl.serverinfo, "*qsg_version")) && *p) {
|
||||
if ((cl.stdver = atoi (p)))
|
||||
Con_Printf ("QSG Standard version %i\n", cl.stdver);
|
||||
if ((cl.stdver = atof (p)))
|
||||
Con_Printf ("Server supports QSG v%s protocol\n", p);
|
||||
else
|
||||
Con_Printf ("Invalid standards version: %s", p);
|
||||
Con_Printf ("Invalid QSG Protocol number: %s", p);
|
||||
}
|
||||
if ((p = Info_ValueForKey (cl.serverinfo, "skybox")) && *p) {
|
||||
//FIXME didn't actually do anything anyway
|
||||
|
@ -1098,8 +1098,6 @@ CL_Init (void)
|
|||
// snprintf (st, sizeof(st), "%s-%04d", QW_VERSION, build_number());
|
||||
snprintf (st, sizeof (st), "%s", QW_VERSION);
|
||||
Info_SetValueForStarKey (cls.userinfo, "*ver", st, MAX_INFO_STRING, 0);
|
||||
Info_SetValueForStarKey (cls.userinfo, "stdver", QW_QSG_VERSION,
|
||||
MAX_INFO_STRING, 0);
|
||||
|
||||
CL_Input_Init ();
|
||||
CL_Ents_Init ();
|
||||
|
|
|
@ -92,6 +92,8 @@ cvar_t *sv_allow_status;
|
|||
cvar_t *sv_allow_log;
|
||||
cvar_t *sv_allow_ping;
|
||||
|
||||
cvar_t *sv_extensions; // Use the extended protocols
|
||||
|
||||
cvar_t *sv_mintic; // bound the size of the
|
||||
cvar_t *sv_maxtic; // physics time tic
|
||||
|
||||
|
@ -610,6 +612,7 @@ void
|
|||
SVC_GetChallenge (void)
|
||||
{
|
||||
int oldest, oldestTime, i;
|
||||
char *extended = "";
|
||||
|
||||
oldest = 0;
|
||||
oldestTime = 0x7fffffff;
|
||||
|
@ -631,9 +634,14 @@ SVC_GetChallenge (void)
|
|||
svs.challenges[oldest].time = realtime;
|
||||
i = oldest;
|
||||
}
|
||||
// send it back
|
||||
Netchan_OutOfBandPrint (net_from, "%c%i QF", S2C_CHALLENGE,
|
||||
svs.challenges[i].challenge);
|
||||
|
||||
if (sv_extensions->int_val) {
|
||||
extended = " QF";
|
||||
}
|
||||
|
||||
// send it to the client
|
||||
Netchan_OutOfBandPrint (net_from, "%c%i%s", S2C_CHALLENGE,
|
||||
svs.challenges[i].challenge, extended);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1681,6 +1689,9 @@ SV_InitLocal (void)
|
|||
sv_maxvelocity = Cvar_Get ("sv_maxvelocity", "2000", CVAR_NONE, NULL,
|
||||
"Sets the maximum velocity an object can "
|
||||
"travel");
|
||||
sv_extensions = Cvar_Get ("sv_extensions", "1", CVAR_NONE, NULL,
|
||||
"Use protocol extensions for QuakeForge "
|
||||
"clients");
|
||||
sv_gravity = Cvar_Get ("sv_gravity", "800", CVAR_NONE, NULL,
|
||||
"Sets the global value for the amount of gravity");
|
||||
sv_stopspeed = Cvar_Get ("sv_stopspeed", "100", CVAR_NONE, NULL,
|
||||
|
@ -1993,7 +2004,7 @@ SV_ExtractFromUserinfo (client_t *cl)
|
|||
cl->messagelevel = atoi (val);
|
||||
}
|
||||
|
||||
cl->stdver = atoi (Info_ValueForKey (cl->userinfo, "stdver"));
|
||||
cl->stdver = atof (Info_ValueForKey (cl->userinfo, "*qsg_version"));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue