X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Fbuffs%2Fsv_buffs.qc;h=5ec00e1253008e57e4c330e7ccb0ee82d171260e;hp=f1a14916611f244ae9878afb0f19b3368dfeef5a;hb=e019e93fac1785e09156f2c3c04a71c6246d8179;hpb=4217ea623aa4a6c6eb6b59728e5872b7fb9d0702 diff --git a/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc b/qcsrc/common/mutators/mutator/buffs/sv_buffs.qc index f1a149166..5ec00e125 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); @@ -954,7 +955,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink) BUFF_ONADD(BUFF_INVISIBLE) { - if(time < player.strength_finished && MUTATOR_IS_ENABLED(mutator_instagib)) + if(time < STAT(STRENGTH_FINISHED, player) && MUTATOR_IS_ENABLED(mutator_instagib)) player.buff_invisible_prev_alpha = default_player_alpha; // we don't want to save the powerup's alpha, as player may lose the powerup while holding the buff else player.buff_invisible_prev_alpha = player.alpha; @@ -963,7 +964,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink) BUFF_ONREM(BUFF_INVISIBLE) { - if(time < player.strength_finished && MUTATOR_IS_ENABLED(mutator_instagib)) + if(time < STAT(STRENGTH_FINISHED, player) && MUTATOR_IS_ENABLED(mutator_instagib)) player.alpha = autocvar_g_instagib_invis_alpha; else player.alpha = player.buff_invisible_prev_alpha;