From a60ee7dae2e4a05ab07b4d49590b617b857ffd1e Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 10 Mar 2019 14:01:17 +0100 Subject: [PATCH] Restore old code in the hope it fixes #2205 for real. This commit together with the previous one fully reverts 5e4b14b3 "Fix wrong (outdated) health/armor values displayed above players when game (re)starts after a countdown" --- qcsrc/common/ent_cs.qc | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 1c3a15a9b..f4ef79eda 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -181,7 +181,6 @@ ENTCS_PROP(FRAGS, true, frags, ENTCS_SET_NORMAL, WriteShort(chan, sf); FOREACH(EntCSProps, sf & BIT(it.m_id), { - it.m_set(this, player); it.m_send(chan, this); }); return true; @@ -196,18 +195,9 @@ ENTCS_PROP(FRAGS, true, frags, ENTCS_SET_NORMAL, { this.nextthink = time + 0.033333333333; // TODO: increase this to like 0.15 once the client can do smoothing entity player = this.owner; - if (!this.realowner) - { - this.realowner = player; - if (IS_REAL_CLIENT(player)) - FOREACH_CLIENT(true, { - assert(CS(it).entcs); - _entcs_send(CS(it).entcs, msg_entity = player, BITS(23), MSG_ONE); - }); - return; - } FOREACH(EntCSProps, it.m_check(this, player), { + it.m_set(this, player); this.SendFlags |= BIT(it.m_id); }); setorigin(this, this.origin); // relink @@ -218,8 +208,13 @@ ENTCS_PROP(FRAGS, true, frags, ENTCS_SET_NORMAL, entity e = CS(player).entcs = new(entcs_sender); e.owner = player; setthink(e, entcs_think); - e.nextthink = time + 0.033333333333; + e.nextthink = time; Net_LinkEntity(e, false, 0, entcs_send); + if (!IS_REAL_CLIENT(player)) return; + FOREACH_CLIENT(true, { + assert(CS(it).entcs); + _entcs_send(CS(it).entcs, msg_entity = player, BITS(23), MSG_ONE); + }); } void entcs_detach(entity player) -- 2.39.2