]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Show crosshair pickup animation when picking up a buff, solves #2413
authorMario <mario.mario@y7mail.com>
Fri, 13 Mar 2020 12:02:43 +0000 (22:02 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 13 Mar 2020 12:02:43 +0000 (22:02 +1000)
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc

index f1a14916611f244ae9878afb0f19b3368dfeef5a..83b471cd810e0c6ae992c9f115d70abc0cabff2a 100644 (file)
@@ -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);