]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Also don't consider player same team if they're dead or spectating
authorMario <mario@smbclan.net>
Fri, 14 Oct 2016 16:51:52 +0000 (02:51 +1000)
committerMario <mario@smbclan.net>
Fri, 14 Oct 2016 16:51:52 +0000 (02:51 +1000)
qcsrc/client/shownames.qc

index 75ef40521ea443504048bb7669c161db0f671fda..a00bd8fa8a806fe8f82284d6dc179f8a001f6f78 100644 (file)
@@ -179,7 +179,8 @@ void Draw_ShowNames_All()
                assert(getthink(entcs), eprint(entcs));
                getthink(entcs)(entcs);
                if (!entcs.has_origin) continue;
-               if (entcs.m_entcs_private)
+               bool dead = entcs_IsDead(i) || entcs_IsSpectating(i);
+               if (entcs.m_entcs_private && !dead)
                {
                        it.healthvalue = entcs.healthvalue;
                        it.armorvalue = entcs.armorvalue;
@@ -191,7 +192,6 @@ void Draw_ShowNames_All()
                        it.armorvalue = 0;
                        it.sameteam = false;
                }
-               bool dead = entcs_IsDead(i) || entcs_IsSpectating(i);
                if (!it.csqcmodel_isdead) setorigin(it, entcs.origin);
                it.csqcmodel_isdead = dead;
                Draw_ShowNames(it);