]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Switch to QC-based setcolor implementation, don't fall back to engine player values
authorMario <mario.mario@y7mail.com>
Sun, 8 Jan 2023 09:58:56 +0000 (19:58 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 8 Jan 2023 09:58:56 +0000 (19:58 +1000)
qcsrc/common/ent_cs.qh
qcsrc/server/teamplay.qc

index db0dc466ba9144c076f9f60284e5366c68055645..d9608ebfb896792aa80f48296b9fc26efc5c5a29 100644 (file)
@@ -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 : "");
        }
 
     /**
index c7c939d74d6e4f3c553f958b611f8008aec2c1a3..9b4455fcfd0c5cbb42605d1e1edf5a7c981f1949 100644 (file)
@@ -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