]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/ent_cs.qh
Merge branch 'master' into Mario/wepent_experimental
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / ent_cs.qh
index 1dec53be65e2434a33779b62d1190f5df0f621fa..ac06dc4788ff0eb0d403075c1a747dba8a62e105 100644 (file)
@@ -68,6 +68,17 @@ 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)
        {
@@ -109,7 +120,7 @@ REGISTER_NET_TEMP(CLIENT_ENTCS)
        string entcs_GetName(int i)
        {
                entity e = entcs_receiver(i);
-               return e ? ColorTranslateRGB(e.netname) : ColorTranslateRGB(getplayerkeyvalue(i, "name"));
+               return ColorTranslateRGB(e ? e.netname : getplayerkeyvalue(i, "name"));
        }
 
     /**