summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-02-23 19:05:15 +0100
committerPaweł Redman <pawel.redman@gmail.com>2018-02-23 19:05:15 +0100
commit88b9c6caf9e8593bb6eb82a4b7a0bcba57952488 (patch)
tree90c4bee6ee59fd51d2f067648a402fcef645cd97 /src
parentb63473f9a4adc85b466d52a28aa2eda8ea0719f8 (diff)
Revert "stop using PERS_SCORE from the server component"
This reverts commit ef4057c1551351ceff9a1378795b2fb8fb929200.
Diffstat (limited to 'src')
-rw-r--r--src/game/bg_public.h2
-rw-r--r--src/server/server.h3
-rw-r--r--src/server/sv_main.c6
3 files changed, 8 insertions, 3 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 04659ebb..0c2a26e1 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -261,7 +261,7 @@ typedef enum
// cleared on respawn
typedef enum
{
- PERS_SCORE,
+ PERS_SCORE, // !!! MUST NOT CHANGE, SERVER AND GAME BOTH REFERENCE !!!
PERS_HITS, // total points damage inflicted so damage beeps can sound on change
PERS_SPAWNS, // how many spawns your team has
PERS_SPECSTATE,
diff --git a/src/server/server.h b/src/server/server.h
index d07c2c94..6b03fd0c 100644
--- a/src/server/server.h
+++ b/src/server/server.h
@@ -29,6 +29,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//=============================================================================
+#define PERS_SCORE 0 // !!! MUST NOT CHANGE, SERVER AND
+ // GAME BOTH REFERENCE !!!
+
#define MAX_ENT_CLUSTERS 16
#ifdef USE_VOIP
diff --git a/src/server/sv_main.c b/src/server/sv_main.c
index 860a0cdb..7b3d8d46 100644
--- a/src/server/sv_main.c
+++ b/src/server/sv_main.c
@@ -538,6 +538,7 @@ static void SVC_Status( netadr_t from ) {
char status[MAX_MSGLEN];
int i;
client_t *cl;
+ playerState_t *ps;
int statusLength;
int playerLength;
char infostring[MAX_INFO_STRING];
@@ -577,8 +578,9 @@ static void SVC_Status( netadr_t from ) {
for (i=0 ; i < sv_maxclients->integer ; i++) {
cl = &svs.clients[i];
if ( cl->state >= CS_CONNECTED ) {
- Com_sprintf (player, sizeof(player), "0 %i \"%s\"\n",
- cl->ping, cl->name);
+ ps = SV_GameClientNum( i );
+ Com_sprintf (player, sizeof(player), "%i %i \"%s\"\n",
+ ps->persistant[PERS_SCORE], cl->ping, cl->name);
playerLength = strlen(player);
if (statusLength + playerLength >= sizeof(status) ) {
break; // can't hold any more