X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fitems%2Fitems.qc;fp=qcsrc%2Fserver%2Fitems%2Fitems.qc;h=0ba0142156d4235a1258a0fc53e783d20028ff1e;hb=ab64afeaea87240618e2d1c177cec2e05022bd9e;hp=adf134979dac02b5e037cec6d62dc1a90151612d;hpb=f85f55e44ca92f7e18edee3b0e459a4184777644;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index adf134979..0ba014215 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -1769,18 +1769,10 @@ float GiveItems(entity e, float beginarg, float endarg) StatusEffects_apply(STATUSEFFECT_Superweapons, e, autocvar_g_balance_superweapons_time, 0, false); } - if(e.statuseffects) - { - FOREACH(StatusEffect, true, - { - if(e.statuseffects.statuseffect_time[it.m_id] <= 0) - e.statuseffects.statuseffect_time[it.m_id] = 0; - else - e.statuseffects.statuseffect_time[it.m_id] += time; - }); - - StatusEffects_update(e); - } + // in this function all the StatusEffects_apply calls are not finalized + // since they only set the effect duration instead of the proper end time + // finalize them here + StatusEffects_finalize(e); for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) {