From d2996fa17bedc94b2d6f3d609158440af0dc2e47 Mon Sep 17 00:00:00 2001 From: TimePath Date: Fri, 4 Dec 2015 19:13:10 +1100 Subject: [PATCH] shownames: exit early if no origin --- qcsrc/client/shownames.qc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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); )); -- 2.39.2