From: terencehill Date: Sun, 1 Sep 2024 12:24:22 +0000 (+0200) Subject: Fix `give no superweapons` giving default superweapons time X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b278706ad9e9c9c4fd0e55368263aafc6aa2323b;p=xonotic%2Fxonotic-data.pk3dir.git Fix `give no superweapons` giving default superweapons time It happened because GiveStatusEffect removed superweapons status effect and this code block added it back. --- diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index 7ceb2b62f..839f3ecc9 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -1757,7 +1757,8 @@ float GiveItems(entity e, float beginarg, float endarg) if(!StatusEffects_active(STATUSEFFECT_Superweapons, e)) { - if(!g_weaponarena && (STAT(WEAPONS, e) & WEPSET_SUPERWEAPONS)) + // also give default superweapon time if player had no superweapons and just got one + if(!g_weaponarena && !(save_weapons & WEPSET_SUPERWEAPONS) && (STAT(WEAPONS, e) & WEPSET_SUPERWEAPONS)) StatusEffects_apply(STATUSEFFECT_Superweapons, e, time + autocvar_g_balance_superweapons_time, 0); }