From: Mario Date: Wed, 4 Sep 2019 10:35:09 +0000 (+1000) Subject: Fix items not providing all their resources if they have multiple X-Git-Tag: xonotic-v0.8.5~1322 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=997940da4a3699a9c90f4c8285358c683c209e6d;p=xonotic%2Fxonotic-data.pk3dir.git Fix items not providing all their resources if they have multiple --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index a5786888c..d349f48c5 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -780,14 +780,14 @@ bool Item_GiveTo(entity item, entity player) } } bool pickedup = false; - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_HEALTH, item.max_health)); - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_ARMOR, item.max_armorvalue)); - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_SHELLS, g_pickup_shells_max)); - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_BULLETS, g_pickup_nails_max)); - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_ROCKETS, g_pickup_rockets_max)); - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_CELLS, g_pickup_cells_max)); - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_PLASMA, g_pickup_plasma_max)); - pickedup = (pickedup || Item_GiveAmmoTo(item, player, RES_FUEL, g_pickup_fuel_max)); + pickedup |= Item_GiveAmmoTo(item, player, RES_HEALTH, item.max_health); + pickedup |= Item_GiveAmmoTo(item, player, RES_ARMOR, item.max_armorvalue); + pickedup |= Item_GiveAmmoTo(item, player, RES_SHELLS, g_pickup_shells_max); + pickedup |= Item_GiveAmmoTo(item, player, RES_BULLETS, g_pickup_nails_max); + pickedup |= Item_GiveAmmoTo(item, player, RES_ROCKETS, g_pickup_rockets_max); + pickedup |= Item_GiveAmmoTo(item, player, RES_CELLS, g_pickup_cells_max); + pickedup |= Item_GiveAmmoTo(item, player, RES_PLASMA, g_pickup_plasma_max); + pickedup |= Item_GiveAmmoTo(item, player, RES_FUEL, g_pickup_fuel_max); if (item.itemdef.instanceOfWeaponPickup) { WepSet w;