X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fent_cs.qc;h=cafef4868b540cd274de8d2f253fd113a6d43623;hb=8cbf0e84432e075e617f43c037c645ea9846eba0;hp=dbadc9abbd6eabe1ff1a5bbd8539bd0d247577a5;hpb=724a41faf2cbfd86d41f3ab59ff8326a831a8326;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index dbadc9abb..cafef4868 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -83,9 +83,8 @@ return _entcs_send(this, to, sf, MSG_ENTITY); } - void entcs_think() + void entcs_think(entity this) { - SELFPARAM(); this.nextthink = time + 0.033333333333; // TODO: increase this to like 0.15 once the client can do smoothing entity o = this.owner; int i = 1; @@ -98,21 +97,21 @@ i += 1; ENTCS_NETPROPS(X); #undef X + setorigin(this, this.origin); // relink } void entcs_attach(entity player) { entity e = player.entcs = new(entcs_sender); - make_pure(e); e.owner = player; - e.think = entcs_think; + setthink(e, entcs_think); e.nextthink = time; Net_LinkEntity(e, false, 0, entcs_send); if (!IS_REAL_CLIENT(player)) return; - FOREACH_CLIENT(true, LAMBDA( + FOREACH_CLIENT(true, { assert(it.entcs); _entcs_send(it.entcs, msg_entity = player, BITS(23), MSG_ONE); - )); + }); } void entcs_detach(entity player) @@ -134,9 +133,8 @@ if (e != this) remove(e); } - void entcs_think() + void entcs_think(entity this) { - SELFPARAM(); entity e = CSQCModel_server2csqc(this.sv_entnum); if (e == NULL) { @@ -169,7 +167,7 @@ make_pure(e); } e.sv_entnum = n; - e.think = entcs_think; + setthink(e, entcs_think); entcs_receiver(n, e); } else if (this && e != this) @@ -189,7 +187,7 @@ #undef X this.iflags |= IFLAG_ORIGIN; InterpolateOrigin_Note(this); - WITH(entity, self, this, this.think()); + getthink(this)(this); return true; }