From 4409c6e68922316303de5f1d7fb45725c7652e19 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 29 Nov 2015 16:24:51 +1100 Subject: [PATCH] entcs: de-jitter --- qcsrc/client/shownames.qc | 1 + qcsrc/common/ent_cs.qc | 24 ++++++++++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index f13efdde0..e217e2d31 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -168,6 +168,7 @@ void Draw_ShowNames_All() LL_EACH(shownames_ent, true, LAMBDA( entity entcs = entcs_receiver(i); if (!entcs) continue; + WITH(entity, self, entcs, entcs.think()); if (entcs.m_entcs_private) { it.healthvalue = entcs.healthvalue; diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index c07fad0d5..a3d3cc8be 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -122,23 +122,19 @@ void entcs_think() { SELFPARAM(); - this.nextthink = time; entity e = CSQCModel_server2csqc(this.sv_entnum); - bool exists = e != NULL; - if (exists) + if (e == NULL) { - this.has_origin = true; - this.origin = e.origin; - // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it - if (this.model != e.model) - { - if (this.model) strunzone(this.model); - this.model = strzone(e.model); - } + this.has_origin = this.has_sv_origin; + return; } - else + this.has_origin = true; + this.origin = e.origin; + // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it + if (this.model != e.model) { - this.has_origin = this.has_sv_origin; + if (this.model) strunzone(this.model); + this.model = strzone(e.model); } } @@ -150,7 +146,6 @@ this.classname = "entcs_receiver"; this.entremove = Ent_RemoveEntCS; this.think = entcs_think; - this.nextthink = time; } InterpolateOrigin_Undo(this); int sf = ReadShort(); @@ -163,6 +158,7 @@ entcs_receiver(this.sv_entnum, this); this.iflags |= IFLAG_ORIGIN; InterpolateOrigin_Note(this); + this.think(); return true; } -- 2.39.2