mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 04:11:53 +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;
|
return pl->frags;
|
||||||
// case 'F': //team frags
|
// case 'F': //team frags
|
||||||
// return 0;
|
// return 0;
|
||||||
|
#ifdef QUAKEHUD
|
||||||
case 'g': //deaths
|
case 'g': //deaths
|
||||||
return Stats_GetDeaths(pl - cl.players);
|
return Stats_GetDeaths(pl - cl.players);
|
||||||
|
#endif
|
||||||
case 'u': //userid
|
case 'u': //userid
|
||||||
return pl - cl.players;
|
return pl - cl.players;
|
||||||
case 'c': //'current run time'
|
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)
|
if (pv->cam_spec_track != j || pv->cam_state == CAM_FREECAM)
|
||||||
{
|
{
|
||||||
|
#ifdef QUAKEHUD
|
||||||
if (cl.teamplay)
|
if (cl.teamplay)
|
||||||
Stats_Message("Now tracking:\n%s\n%s", cl.players[j].name, cl.players[j].team);
|
Stats_Message("Now tracking:\n%s\n%s", cl.players[j].name, cl.players[j].team);
|
||||||
else
|
else
|
||||||
Stats_Message("Now tracking:\n%s", cl.players[j].name);
|
Stats_Message("Now tracking:\n%s", cl.players[j].name);
|
||||||
|
#endif
|
||||||
Cam_Lock(pv, j);
|
Cam_Lock(pv, j);
|
||||||
//un-lock any higher seats watching our new target. this keeps things ordered.
|
//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++)
|
for (spv = pv+1; spv >= cl.playerview && spv < &cl.playerview[cl.splitclients]; spv++)
|
||||||
|
|
|
@ -4370,8 +4370,9 @@ void CL_Init (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Ignore_Init();
|
Ignore_Init();
|
||||||
|
#ifdef QUAKEHUD
|
||||||
Stats_Init();
|
Stats_Init();
|
||||||
|
#endif
|
||||||
CL_ClearState(); //make sure the cl.* fields are set properly if there's no ssqc or whatever.
|
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 ();
|
NET_Shutdown ();
|
||||||
FS_Shutdown();
|
FS_Shutdown();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef QUAKEHUD
|
||||||
Stats_Clear();
|
Stats_Clear();
|
||||||
|
#endif
|
||||||
#ifdef Q3CLIENT
|
#ifdef Q3CLIENT
|
||||||
VMQ3_FlushStringHandles();
|
VMQ3_FlushStringHandles();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3049,7 +3049,9 @@ static void CLQW_ParseServerData (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
CL_ClearState ();
|
CL_ClearState ();
|
||||||
|
#ifdef QUAKEHUD
|
||||||
Stats_NewMap();
|
Stats_NewMap();
|
||||||
|
#endif
|
||||||
cl.servercount = svcnt;
|
cl.servercount = svcnt;
|
||||||
|
|
||||||
Cvar_ForceCallback(Cvar_FindVar("r_particlesdesc"));
|
Cvar_ForceCallback(Cvar_FindVar("r_particlesdesc"));
|
||||||
|
@ -3309,9 +3311,10 @@ static void CLQ2_ParseServerData (void)
|
||||||
cl.maxpitch = 89;
|
cl.maxpitch = 89;
|
||||||
cl.servercount = svcnt;
|
cl.servercount = svcnt;
|
||||||
Cam_AutoTrack_Update(NULL);
|
Cam_AutoTrack_Update(NULL);
|
||||||
|
|
||||||
|
#ifdef QUAKEHUD
|
||||||
Stats_NewMap();
|
Stats_NewMap();
|
||||||
|
#endif
|
||||||
|
|
||||||
// parse player entity number
|
// parse player entity number
|
||||||
cl.playerview[0].playernum = MSG_ReadShort ();
|
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");
|
Con_DPrintf ("Serverdata packet %s.\n", cls.demoplayback?"read":"received");
|
||||||
SCR_SetLoadingStage(LS_CLIENT);
|
SCR_SetLoadingStage(LS_CLIENT);
|
||||||
CL_ClearState ();
|
CL_ClearState ();
|
||||||
|
#ifdef QUAKEHUD
|
||||||
Stats_NewMap();
|
Stats_NewMap();
|
||||||
|
#endif
|
||||||
Cvar_ForceCallback(Cvar_FindVar("r_particlesdesc"));
|
Cvar_ForceCallback(Cvar_FindVar("r_particlesdesc"));
|
||||||
|
|
||||||
CLNQ_ParseProtoVersion();
|
CLNQ_ParseProtoVersion();
|
||||||
|
@ -6073,8 +6078,13 @@ static void CL_ParsePrint(char *msg, int level)
|
||||||
#ifdef PLUGINS
|
#ifdef PLUGINS
|
||||||
if (Plug_ServerMessage(printtext, level))
|
if (Plug_ServerMessage(printtext, level))
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef QUAKEHUD
|
||||||
if (!Stats_ParsePickups(printtext) || !msg_filter_pickups.ival)
|
if (!Stats_ParsePickups(printtext) || !msg_filter_pickups.ival)
|
||||||
if (!Stats_ParsePrintLine(printtext) || !msg_filter_frags.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);
|
CL_PrintStandardMessage(printtext, level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
|
|
||||||
|
#ifdef QUAKEHUD
|
||||||
#define MAX_WEAPONS 64 //fixme: make dynamic.
|
#define MAX_WEAPONS 64 //fixme: make dynamic.
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -837,4 +839,4 @@ void Stats_NewMap(void)
|
||||||
{
|
{
|
||||||
Stats_LoadFragFile("fragfile");
|
Stats_LoadFragFile("fragfile");
|
||||||
}
|
}
|
||||||
|
#endif
|
Loading…
Reference in a new issue