mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 06:32:00 +00:00
Including "fragstats" features only when QUAKEHUD is defined.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5127 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
db8663d826
commit
2c17bcc3d5
4 changed files with 23 additions and 6 deletions
|
@ -156,8 +156,10 @@ static float CL_TrackScoreProp(player_info_t *pl, char rule, float *weights)
|
|||
return pl->frags;
|
||||
// case 'F': //team frags
|
||||
// return 0;
|
||||
#ifdef QUAKEHUD
|
||||
case 'g': //deaths
|
||||
return Stats_GetDeaths(pl - cl.players);
|
||||
#endif
|
||||
case 'u': //userid
|
||||
return pl - cl.players;
|
||||
case 'c': //'current run time'
|
||||
|
@ -727,10 +729,12 @@ static void Cam_CheckHighTarget(playerview_t *pv)
|
|||
{
|
||||
if (pv->cam_spec_track != j || pv->cam_state == CAM_FREECAM)
|
||||
{
|
||||
#ifdef QUAKEHUD
|
||||
if (cl.teamplay)
|
||||
Stats_Message("Now tracking:\n%s\n%s", cl.players[j].name, cl.players[j].team);
|
||||
else
|
||||
Stats_Message("Now tracking:\n%s", cl.players[j].name);
|
||||
#endif
|
||||
Cam_Lock(pv, j);
|
||||
//un-lock any higher seats watching our new target. this keeps things ordered.
|
||||
for (spv = pv+1; spv >= cl.playerview && spv < &cl.playerview[cl.splitclients]; spv++)
|
||||
|
|
|
@ -4370,8 +4370,9 @@ void CL_Init (void)
|
|||
#endif
|
||||
|
||||
Ignore_Init();
|
||||
|
||||
#ifdef QUAKEHUD
|
||||
Stats_Init();
|
||||
#endif
|
||||
CL_ClearState(); //make sure the cl.* fields are set properly if there's no ssqc or whatever.
|
||||
}
|
||||
|
||||
|
@ -6163,9 +6164,9 @@ void Host_Shutdown(void)
|
|||
NET_Shutdown ();
|
||||
FS_Shutdown();
|
||||
#endif
|
||||
|
||||
#ifdef QUAKEHUD
|
||||
Stats_Clear();
|
||||
|
||||
#endif
|
||||
#ifdef Q3CLIENT
|
||||
VMQ3_FlushStringHandles();
|
||||
#endif
|
||||
|
|
|
@ -3049,7 +3049,9 @@ static void CLQW_ParseServerData (void)
|
|||
}
|
||||
|
||||
CL_ClearState ();
|
||||
#ifdef QUAKEHUD
|
||||
Stats_NewMap();
|
||||
#endif
|
||||
cl.servercount = svcnt;
|
||||
|
||||
Cvar_ForceCallback(Cvar_FindVar("r_particlesdesc"));
|
||||
|
@ -3309,9 +3311,10 @@ static void CLQ2_ParseServerData (void)
|
|||
cl.maxpitch = 89;
|
||||
cl.servercount = svcnt;
|
||||
Cam_AutoTrack_Update(NULL);
|
||||
|
||||
|
||||
#ifdef QUAKEHUD
|
||||
Stats_NewMap();
|
||||
|
||||
#endif
|
||||
|
||||
// parse player entity number
|
||||
cl.playerview[0].playernum = MSG_ReadShort ();
|
||||
|
@ -3554,7 +3557,9 @@ static void CLNQ_ParseServerData(void) //Doesn't change gamedir - use with caut
|
|||
Con_DPrintf ("Serverdata packet %s.\n", cls.demoplayback?"read":"received");
|
||||
SCR_SetLoadingStage(LS_CLIENT);
|
||||
CL_ClearState ();
|
||||
#ifdef QUAKEHUD
|
||||
Stats_NewMap();
|
||||
#endif
|
||||
Cvar_ForceCallback(Cvar_FindVar("r_particlesdesc"));
|
||||
|
||||
CLNQ_ParseProtoVersion();
|
||||
|
@ -6073,8 +6078,13 @@ static void CL_ParsePrint(char *msg, int level)
|
|||
#ifdef PLUGINS
|
||||
if (Plug_ServerMessage(printtext, level))
|
||||
#endif
|
||||
#ifdef QUAKEHUD
|
||||
if (!Stats_ParsePickups(printtext) || !msg_filter_pickups.ival)
|
||||
if (!Stats_ParsePrintLine(printtext) || !msg_filter_frags.ival)
|
||||
#else
|
||||
if (!msg_filter_pickups.ival)
|
||||
if (!msg_filter_frags.ival)
|
||||
#endif
|
||||
CL_PrintStandardMessage(printtext, level);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
|
||||
#include "quakedef.h"
|
||||
|
||||
#ifdef QUAKEHUD
|
||||
#define MAX_WEAPONS 64 //fixme: make dynamic.
|
||||
|
||||
typedef enum {
|
||||
|
@ -837,4 +839,4 @@ void Stats_NewMap(void)
|
|||
{
|
||||
Stats_LoadFragFile("fragfile");
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue