mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Cleaned up some precompiler conditions.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1553 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c916e40299
commit
118d71793d
5 changed files with 24 additions and 5 deletions
|
@ -5114,12 +5114,14 @@ void PF_infokey (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
// value = "";
|
||||
else if (!strcmp(key, "trustlevel")) //info for progs.
|
||||
{
|
||||
#ifdef SVRANKING
|
||||
rankstats_t rs;
|
||||
if (!svs.clients[e1-1].rankid)
|
||||
value = "";
|
||||
else if (Rank_GetPlayerStats(svs.clients[e1-1].rankid, &rs))
|
||||
sprintf(ov, "%d", rs.trustlevel);
|
||||
else
|
||||
#endif
|
||||
value = "";
|
||||
}
|
||||
else
|
||||
|
@ -7443,7 +7445,7 @@ void PF_plaque_draw(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
MSG_WriteByte (QWWriteDest(G_FLOAT(OFS_PARM0)), 'P');
|
||||
}
|
||||
MSG_WriteString (QWWriteDest(G_FLOAT(OFS_PARM0)), s);
|
||||
|
||||
#ifdef NQPROT
|
||||
MSG_WriteByte (NQWriteDest(G_FLOAT(OFS_PARM0)), svc_centerprint);
|
||||
if (*s)
|
||||
{
|
||||
|
@ -7451,6 +7453,7 @@ void PF_plaque_draw(progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
MSG_WriteByte (NQWriteDest(G_FLOAT(OFS_PARM0)), 'P');
|
||||
}
|
||||
MSG_WriteString (NQWriteDest(G_FLOAT(OFS_PARM0)), s);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ void SV_Logfile_f (void)
|
|||
Con_Printf(va("Logging to %s/%s/%s.log.\n", com_basedir, d, f));
|
||||
Cvar_SetValue(&log_enable, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -659,8 +659,9 @@ void SV_BanName_f (void)
|
|||
{
|
||||
client_t *cl;
|
||||
int clnum=-1;
|
||||
|
||||
#ifdef SVRANKING
|
||||
rankstats_t rs;
|
||||
#endif
|
||||
|
||||
|
||||
while((cl = SV_GetClientForString(Cmd_Argv(1), &clnum)))
|
||||
|
@ -669,6 +670,7 @@ void SV_BanName_f (void)
|
|||
// print directly, because the dropped client won't get the
|
||||
// SV_BroadcastPrintf message
|
||||
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUWEREBANNED);
|
||||
#ifdef SVRANKING
|
||||
if (cl->rankid)
|
||||
{
|
||||
if (Rank_GetPlayerStats(cl->rankid, &rs))
|
||||
|
@ -679,6 +681,7 @@ void SV_BanName_f (void)
|
|||
}
|
||||
else
|
||||
Con_Printf("User is not using an account\n");
|
||||
#endif
|
||||
SV_DropClient (cl);
|
||||
}
|
||||
|
||||
|
@ -1196,7 +1199,7 @@ void SV_Serverinfo_f (void)
|
|||
else
|
||||
Info_RemoveKey(svs.info, k); //we can remove this one though, so yay.
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
Con_TPrintf (TL_STARKEYPROTECTED);
|
||||
|
|
|
@ -526,7 +526,9 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
|||
#ifndef SERVERONLY
|
||||
Wads_Flush(); //server code is responsable for flushing old state
|
||||
#endif
|
||||
#ifdef SVRANKING
|
||||
Rank_Flush();
|
||||
#endif
|
||||
|
||||
for (i = 0; i < MAX_CLIENTS; i++)
|
||||
{
|
||||
|
|
|
@ -460,8 +460,10 @@ void SV_DropClient (client_t *drop)
|
|||
drop->istobeloaded = false;
|
||||
|
||||
drop->old_frags = 0;
|
||||
#ifdef SVRANKING
|
||||
drop->kills = 0;
|
||||
drop->deaths = 0;
|
||||
#endif
|
||||
if (svprogfuncs && drop->edict)
|
||||
drop->edict->v->frags = 0;
|
||||
drop->name[0] = 0;
|
||||
|
@ -1935,6 +1937,7 @@ void SVC_RemoteCommand (void)
|
|||
|
||||
if (!Rcon_Validate ())
|
||||
{
|
||||
#ifdef SVRANKING
|
||||
if (cmd_allowaccess.value) //try and find a username, match the numeric password
|
||||
{
|
||||
int rid;
|
||||
|
@ -1989,6 +1992,7 @@ void SVC_RemoteCommand (void)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Con_Printf ("Bad rcon from %s:\n%s\n"
|
||||
, NET_AdrToString (net_from), net_message.data+4);
|
||||
|
@ -3360,6 +3364,7 @@ void SV_FixupName(char *in, char *out)
|
|||
|
||||
qboolean ReloadRanking(client_t *cl, char *newname)
|
||||
{
|
||||
#ifdef SVRANKING
|
||||
int newid;
|
||||
int j;
|
||||
rankstats_t rs;
|
||||
|
@ -3412,6 +3417,7 @@ qboolean ReloadRanking(client_t *cl, char *newname)
|
|||
cl->trustlevel = rs.trustlevel;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -2860,10 +2860,12 @@ void Cmd_Observe_f (void)
|
|||
|
||||
void SV_EnableClientsCSQC(void)
|
||||
{
|
||||
#ifdef PEXT_CSQC
|
||||
if (host_client->fteprotocolextensions & PEXT_CSQC)
|
||||
host_client->csqcactive = true;
|
||||
else
|
||||
Con_DPrintf("CSQC enabled without protocol extensions\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
void SV_MVDList_f (void);
|
||||
|
@ -3002,9 +3004,11 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
|
|||
u = ucmdsq2;
|
||||
else
|
||||
#endif
|
||||
#ifdef NQPROT
|
||||
if (ISNQCLIENT(host_client))
|
||||
u = nqucmds;
|
||||
else
|
||||
#endif
|
||||
u=ucmds;
|
||||
|
||||
for ( ; u->name ; u++)
|
||||
|
@ -3031,7 +3035,7 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
|
|||
host_client = oldhost;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef SVRANKING
|
||||
if (sv_cmdlikercon.value && host_client->rankid)
|
||||
{
|
||||
char remaining[1024];
|
||||
|
@ -3071,6 +3075,7 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
|
|||
SV_EndRedirect ();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
Con_Printf ("Bad user command: %s\n", Cmd_Argv(0));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue