diff options
author | /dev/humancontroller <devhc@example.com> | 2017-02-07 18:25:37 +0100 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:07 +0100 |
commit | ef4057c1551351ceff9a1378795b2fb8fb929200 (patch) | |
tree | 7207db4dd545129401bef796a46a2226d3113d8f | |
parent | d8b92ee09b6032443f0ed6eff7973f292d7a66b6 (diff) |
stop using PERS_SCORE from the server component
because score is a game-specific thing
also, this prevents (Aasimar's hack) the use of server status queries to determine who is spectating whom
-rw-r--r-- | src/game/bg_public.h | 2 | ||||
-rw-r--r-- | src/server/server.h | 3 | ||||
-rw-r--r-- | src/server/sv_main.c | 6 |
3 files changed, 3 insertions, 8 deletions
diff --git a/src/game/bg_public.h b/src/game/bg_public.h index b5620401..bbb2f08b 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -262,7 +262,7 @@ typedef enum // cleared on respawn typedef enum { - PERS_SCORE, // !!! MUST NOT CHANGE, SERVER AND GAME BOTH REFERENCE !!! + PERS_SCORE, 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 d5e69eb2..0d56ea11 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -29,9 +29,6 @@ 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 ec0954a5..e5b260e5 100644 --- a/src/server/sv_main.c +++ b/src/server/sv_main.c @@ -514,7 +514,6 @@ 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]; @@ -549,9 +548,8 @@ static void SVC_Status( netadr_t from ) { for (i=0 ; i < sv_maxclients->integer ; i++) { cl = &svs.clients[i]; if ( cl->state >= CS_CONNECTED ) { - ps = SV_GameClientNum( i ); - Com_sprintf (player, sizeof(player), "%i %i \"%s\"\n", - ps->persistant[PERS_SCORE], cl->ping, cl->name); + Com_sprintf (player, sizeof(player), "0 %i \"%s\"\n", + cl->ping, cl->name); playerLength = strlen(player); if (statusLength + playerLength >= sizeof(status) ) { break; // can't hold any more |