From: terencehill Date: Thu, 21 Jan 2021 12:47:53 +0000 (+0100) Subject: Don't update health value in the bar above players after the game ends, as it's set... X-Git-Tag: xonotic-v0.8.5~592 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6cf8d564903730469971f6e7dbc37cc5d84f6a7a;p=xonotic%2Fxonotic-data.pk3dir.git Don't update health value in the bar above players after the game ends, as it's set to special values --- diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 7d8442140..777bd417a 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -21,13 +21,13 @@ STATIC_INIT(EntCSProps_renumber) { FOREACH(EntCSProps, true, it.m_id = i); } // these entcs_props ids need to be referenced directly int ENTCS_PROP_ENTNUM_id = 0; int ENTCS_PROP_ORIGIN_id = 0; +int ENTCS_PROP_HEALTH_id = 0; STATIC_INIT(EntCSProps_setglobalids) { FOREACH(EntCSProps, true, { - if (it.registered_id == "ENTCS_PROP_ENTNUM") - ENTCS_PROP_ENTNUM_id = it.m_id; - if (it.registered_id == "ENTCS_PROP_ORIGIN") - ENTCS_PROP_ORIGIN_id = it.m_id; + if (it.registered_id == "ENTCS_PROP_ENTNUM") ENTCS_PROP_ENTNUM_id = it.m_id; + if (it.registered_id == "ENTCS_PROP_ORIGIN") ENTCS_PROP_ORIGIN_id = it.m_id; + if (it.registered_id == "ENTCS_PROP_HEALTH") ENTCS_PROP_HEALTH_id = it.m_id; }); } @@ -211,6 +211,11 @@ ENTCS_PROP(SOLID, true, sv_solid, solid, ENTCS_SET_NORMAL, it.m_set(this, player); this.SendFlags |= BIT(it.m_id); }); + if (intermission_running) + { + // health is set to special values after the game ends, ignore any change + this.SendFlags &= ~BIT(ENTCS_PROP_HEALTH_id); + } setorigin(this, this.origin); // relink }