From: terencehill Date: Thu, 1 Dec 2016 18:41:53 +0000 (+0100) Subject: Instead of hiding waypoints for eliminated players in CA clientside make so that... X-Git-Tag: xonotic-v0.8.2~402 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5ddd4f56a56e3dfbd4f21855d9e1e69f69551df0;p=xonotic%2Fxonotic-data.pk3dir.git 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" --- 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) {