From 5ddd4f56a56e3dfbd4f21855d9e1e69f69551df0 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 1 Dec 2016 19:41:53 +0100 Subject: [PATCH] Instead of hiding waypoints for eliminated players in CA clientside make so that server never sends private entcs informations of spectators as they're pointless. This way names above eliminated player (CA) and quitters (LMS) don't appear as well as their icons in the radar (CA and LMS); it also reduces bandwith usage This commit reverts 8923c4865 "CA: fix name tags getting displayed above eliminated players (when they are spectating or observing). It fixes #1813" --- qcsrc/client/shownames.qc | 2 -- qcsrc/common/ent_cs.qc | 5 +++++ qcsrc/common/ent_cs.qh | 11 ----------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 76125e60b..6a4515ac1 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -193,8 +193,6 @@ void Draw_ShowNames_All() it.sameteam = false; } bool dead = entcs_IsDead(i) || entcs_IsSpectating(i); - if(gametype == MAPINFO_TYPE_CA) - dead = (dead || entcs_IsEliminated(i)); if (!it.csqcmodel_isdead) setorigin(it, entcs.origin); it.csqcmodel_isdead = dead; Draw_ShowNames(it); diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index da53f68a0..71052bd2b 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -73,6 +73,11 @@ MACRO_END entity player = this.owner; sf |= BIT(0); // assume private do { + if (!(IS_PLAYER(player))) + { + sf &= ENTCS_PUBLICMASK; // no private updates + break; + } if (radar_showennemies) break; if (SAME_TEAM(to, player)) break; if (!(IS_PLAYER(to) || to.caplayer) && time > game_starttime) break; diff --git a/qcsrc/common/ent_cs.qh b/qcsrc/common/ent_cs.qh index ac06dc478..65cdd83d3 100644 --- a/qcsrc/common/ent_cs.qh +++ b/qcsrc/common/ent_cs.qh @@ -68,17 +68,6 @@ REGISTER_NET_TEMP(CLIENT_ENTCS) /** * @param i zero indexed player - */ - .int frags; - bool entcs_IsEliminated(int i) - { - bool unconnected = !playerslots[i].gotscores; - entity e = entcs_receiver(i); - return unconnected || ((e) ? e.frags : stof(getplayerkeyvalue(i, "frags"))) == FRAGS_LMS_LOSER; - } - - /** - * @param i zero indexed player */ int entcs_GetClientColors(int i) { -- 2.39.2