From: Mario Date: Mon, 13 Apr 2020 13:45:11 +0000 (+1000) Subject: Merge branch 'master' into Mario/strength_stat_field X-Git-Tag: xonotic-v0.8.5~1089^2~1 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=d841a3f6bd4c6af2da0506828c84063933d80ca1;hp=e019e93fac1785e09156f2c3c04a71c6246d8179 Merge branch 'master' into Mario/strength_stat_field --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 4ab00a0272..bedf042c30 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -1565,6 +1565,8 @@ spawnfunc(target_items) if(GetResource(this, RES_FUEL) != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, GetResource(this, RES_FUEL)), "fuel"); if(GetResource(this, RES_HEALTH) != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, GetResource(this, RES_HEALTH)), "health"); if(GetResource(this, RES_ARMOR) != 0) this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, GetResource(this, RES_ARMOR)), "armor"); + // HACK: buffs share a single timer, so we need to include enabled buffs AFTER disabled ones to avoid loss + FOREACH(Buffs, it != BUFF_Null && !(STAT(BUFFS, this) & it.m_itemid), this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, STAT(BUFF_TIME, this)), it.netname)); FOREACH(Buffs, it != BUFF_Null && (STAT(BUFFS, this) & it.m_itemid), this.netname = sprintf("%s %s%d %s", this.netname, valueprefix, max(0, STAT(BUFF_TIME, this)), it.netname)); FOREACH(Weapons, it != WEP_Null, this.netname = sprintf("%s %s%d %s", this.netname, itemprefix, !!(STAT(WEAPONS, this) & (it.m_wepset)), it.netname)); }