]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
shownames: exit early if no origin
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 4 Dec 2015 08:13:10 +0000 (19:13 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 4 Dec 2015 08:13:34 +0000 (19:13 +1100)
qcsrc/client/shownames.qc

index a9a9783f7cc141245319097b5889024a9e14aecd..66f313d3a2fad3aba0ed8904d72aff70013b6b8d 100644 (file)
@@ -174,12 +174,9 @@ void Draw_ShowNames_All()
                        continue;
                }
                make_impure(it);
-               if (entcs.think) WITH(entity, self, entcs, entcs.think());
-               else
-               {
-                       LOG_WARNING("entcs.think == null");
-                       eprint(entcs);
-               }
+               assert(entcs.think, eprint(entcs));
+               WITH(entity, self, entcs, entcs.think());
+               if (!entcs.has_origin) continue;
                if (entcs.m_entcs_private)
                {
                        it.healthvalue = entcs.healthvalue;
@@ -193,7 +190,7 @@ void Draw_ShowNames_All()
                        it.sameteam = false;
                }
                bool dead = entcs_IsDead(i) || entcs_IsSpectating(i);
-               if (!it.csqcmodel_isdead && entcs.has_origin) setorigin(it, entcs.origin);
+               if (!it.csqcmodel_isdead) setorigin(it, entcs.origin);
                it.csqcmodel_isdead = dead;
                Draw_ShowNames(it);
        ));