From: Mario Date: Fri, 13 Mar 2020 12:02:43 +0000 (+1000) Subject: Show crosshair pickup animation when picking up a buff, solves #2413 X-Git-Tag: xonotic-v0.8.5~1145^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3cd90b2dd499cbe6419a8fe5e8a0ee339aaa191b;p=xonotic%2Fxonotic-data.pk3dir.git Show crosshair pickup animation when picking up a buff, solves #2413 --- diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index f1a149166..83b471cd8 100644 --- a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc @@ -203,6 +203,7 @@ void buff_Touch(entity this, entity toucher) Send_Effect(EFFECT_ITEM_PICKUP, CENTER_OR_VIEWOFS(this), '0 0 0', 1); sound(toucher, CH_TRIGGER, SND_SHIELD_RESPAWN, VOL_BASE, ATTN_NORM); STAT(BUFFS, toucher) |= (STAT(BUFFS, this)); + STAT(LAST_PICKUP, toucher) = time; float bufftime = ((this.count) ? this.count : thebuff.m_time(thebuff)); if(bufftime) STAT(BUFF_TIME, toucher) = min(time + bufftime, max(STAT(BUFF_TIME, toucher), time) + bufftime);