]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/shownames.qc
Make it compile without XONOTIC defined
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / shownames.qc
index 5368cb6429177ef4130a10e45610596485cab269..6a4515ac14f128f4b20eba195a090b849a0a138c 100644 (file)
@@ -1,9 +1,10 @@
 #include "shownames.qh"
 
-#include "hud/all.qh"
+#include "hud/_mod.qh"
 
 #include <common/ent_cs.qh>
 #include <common/constants.qh>
+#include <common/net_linked.qh>
 #include <common/mapinfo.qh>
 #include <common/teams.qh>
 
@@ -34,7 +35,7 @@ const float SHOWNAMES_FADESPEED = 4;
 const float SHOWNAMES_FADEDELAY = 0.4;
 void Draw_ShowNames(entity this)
 {
-       if (this.sv_entnum == player_localentnum)  // self or spectatee
+       if (this.sv_entnum == (current_player + 1))  // self or spectatee
                if (!(autocvar_hud_shownames_self && autocvar_chase_active)) return;
        if (!this.sameteam && !autocvar_hud_shownames_enemies) return;
        bool hit;
@@ -167,7 +168,6 @@ void Draw_ShowNames(entity this)
 
 void Draw_ShowNames_All()
 {
-    SELFPARAM();
        if (!autocvar_hud_shownames) return;
        LL_EACH(shownames_ent, true, {
                entity entcs = entcs_receiver(i);
@@ -177,8 +177,8 @@ void Draw_ShowNames_All()
                        continue;
                }
                make_impure(it);
-               assert(entcs.think, eprint(entcs));
-               WITHSELF(entcs, entcs.think());
+               assert(getthink(entcs), eprint(entcs));
+               getthink(entcs)(entcs);
                if (!entcs.has_origin) continue;
                if (entcs.m_entcs_private)
                {