From b4c469ba929d71ff142bbcfa71b0c68b6a9ec3fc Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 8 Jan 2023 19:58:56 +1000 Subject: [PATCH] Switch to QC-based setcolor implementation, don't fall back to engine player values --- qcsrc/common/ent_cs.qh | 6 +++--- qcsrc/server/teamplay.qc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/ent_cs.qh b/qcsrc/common/ent_cs.qh index db0dc466b..d9608ebfb 100644 --- a/qcsrc/common/ent_cs.qh +++ b/qcsrc/common/ent_cs.qh @@ -79,7 +79,7 @@ REGISTER_NET_TEMP(CLIENT_ENTCS) { bool unconnected = !playerslots[i].gotscores; entity e = entcs_receiver(i); - int fr = ((e) ? e.frags : stof(getplayerkeyvalue(i, "frags"))); + int fr = ((e) ? e.frags : 0); if (unconnected || fr == FRAGS_SPECTATOR) return ENTCS_SPEC_PURE; int sol = ((e) ? e.sv_solid : SOLID_NOT); @@ -94,7 +94,7 @@ REGISTER_NET_TEMP(CLIENT_ENTCS) int entcs_GetClientColors(int i) { entity e = entcs_receiver(i); - return e ? e.colormap : stof(getplayerkeyvalue(i, "colors")); + return e ? e.colormap : 0; } /** @@ -130,7 +130,7 @@ REGISTER_NET_TEMP(CLIENT_ENTCS) string entcs_GetName(int i) { entity e = entcs_receiver(i); - return ColorTranslateRGB(e ? e.netname : getplayerkeyvalue(i, "name")); + return ColorTranslateRGB(e ? e.netname : ""); } /** diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index c7c939d74..9b4455fcf 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -160,7 +160,7 @@ int Team_GetNumberOfTeamsWithOwnedItems() void setcolor(entity this, int clr) { -#if 0 +#if 1 this.clientcolors = clr; this.team = (clr & 15) + 1; #else -- 2.39.2