From: terencehill Date: Sat, 6 May 2023 21:53:34 +0000 (+0200) Subject: LMS: if normal items are enabled don't convert megahealth to extralife X-Git-Tag: xonotic-v0.8.6~114^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ca4acbc9ffef99698e99cae66039e2f2a3976357;p=xonotic%2Fxonotic-data.pk3dir.git LMS: if normal items are enabled don't convert megahealth to extralife --- diff --git a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc index 692d987aa..82899e421 100644 --- a/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc +++ b/qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc @@ -643,14 +643,14 @@ MUTATOR_HOOKFUNCTION(lms, ForbidPlayerScore_Clear) MUTATOR_HOOKFUNCTION(lms, FilterItemDefinition) { - if (autocvar_g_lms_items) + if (autocvar_g_lms_items || autocvar_g_pickup_items > 0) return false; entity def = M_ARGV(0, entity); - if (autocvar_g_powerups && autocvar_g_lms_extra_lives && (def == ITEM_ExtraLife || def == ITEM_HealthMega)) return false; - return (autocvar_g_pickup_items <= 0); // only allow items if explicitly enabled + + return true; } void lms_replace_with_extralife(entity this) @@ -665,7 +665,7 @@ MUTATOR_HOOKFUNCTION(lms, FilterItem) { entity item = M_ARGV(0, entity); entity def = item.itemdef; - if(def == ITEM_HealthMega) + if(def == ITEM_HealthMega && !(autocvar_g_lms_items || autocvar_g_pickup_items > 0)) { if(autocvar_g_powerups && autocvar_g_lms_extra_lives) lms_replace_with_extralife(item);