]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/ent_cs.qh
Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / ent_cs.qh
index 1dec53be65e2434a33779b62d1190f5df0f621fa..14a758b2615a88f9d8bf825eab629dad3f1877ae 100644 (file)
@@ -1,5 +1,9 @@
 #pragma once
 
+#ifdef CSQC
+#include <client/defs.qh>
+#endif
+
 REGISTER_NET_LINKED(ENT_CLIENT_ENTCS)
 REGISTER_NET_TEMP(CLIENT_ENTCS)
 
@@ -109,7 +113,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"));
        }
 
     /**