]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
entcs: de-jitter
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 29 Nov 2015 05:24:51 +0000 (16:24 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 29 Nov 2015 05:24:51 +0000 (16:24 +1100)
qcsrc/client/shownames.qc
qcsrc/common/ent_cs.qc

index f13efdde050df357b3f98e3f14d74b56e1624bf4..e217e2d31e6bdad5fe4fa0ec2956abebb59acff9 100644 (file)
@@ -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;
index c07fad0d5242fc08dc7a9e1c26b1d79d98c6bee3..a3d3cc8be6aabec15490439354428ec71dd7956f 100644 (file)
        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);
                }
        }
 
                        this.classname = "entcs_receiver";
                        this.entremove = Ent_RemoveEntCS;
                        this.think = entcs_think;
-                       this.nextthink = time;
                }
                InterpolateOrigin_Undo(this);
                int sf = ReadShort();
                entcs_receiver(this.sv_entnum, this);
                this.iflags |= IFLAG_ORIGIN;
                InterpolateOrigin_Note(this);
+               this.think();
                return true;
        }