From: TimePath Date: Fri, 4 Dec 2015 08:13:10 +0000 (+1100) Subject: shownames: exit early if no origin X-Git-Tag: xonotic-v0.8.2~1556 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d2996fa17bedc94b2d6f3d609158440af0dc2e47;p=xonotic%2Fxonotic-data.pk3dir.git shownames: exit early if no origin --- diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index a9a9783f7..66f313d3a 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -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); ));