From 997940da4a3699a9c90f4c8285358c683c209e6d Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 4 Sep 2019 20:35:09 +1000 Subject: [PATCH] Fix items not providing all their resources if they have multiple --- qcsrc/common/t_items.qc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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; -- 2.39.2