From 7d33231d5c7493336efdece905890ec41793448b Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 18 Jan 2017 14:58:51 +0100 Subject: [PATCH] Make health value comparable to armor value (armor rating now takes less into account current health value) and make them start from 0 so they're evaluated 0 when there's no need of them --- qcsrc/common/items/item/armor.qh | 2 +- qcsrc/common/items/item/health.qh | 2 +- qcsrc/common/t_items.qc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index 9fcd07634..a0e4ab277 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -6,7 +6,7 @@ CLASS(Armor, Pickup) ATTRIB(Armor, m_mins, vector, '-16 -16 0'); ATTRIB(Armor, m_maxs, vector, '16 16 48'); ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); - ATTRIB(Armor, m_botvalue, int, 3000); + ATTRIB(Armor, m_botvalue, int, 5000); #endif ENDCLASS(Armor) diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index e32d0ebbd..3332429dc 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -6,7 +6,7 @@ CLASS(Health, Pickup) ATTRIB(Health, m_mins, vector, '-16 -16 0'); ATTRIB(Health, m_maxs, vector, '16 16 48'); ATTRIB(Health, m_pickupevalfunc, float(entity player, entity item), healtharmor_pickupevalfunc); - ATTRIB(Health, m_botvalue, int, 2500); + ATTRIB(Health, m_botvalue, int, 5000); #endif ENDCLASS(Health) diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index a121d1568..e04b31d8c 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -1028,7 +1028,7 @@ float ammo_pickupevalfunc(entity player, entity item) if (player.ammo_fuel < g_pickup_fuel_max) c = item.ammo_fuel / player.ammo_fuel; - rating *= min(3, 1 + c); + rating *= min(2, c); if(wpn) // Skilled bots will grab more rating += wpn.bot_pickupbasevalue * (0.1 + 0.1 * bound(0, skill / 10, 1)); @@ -1042,12 +1042,12 @@ float healtharmor_pickupevalfunc(entity player, entity item) if (item.armorvalue) if (player.armorvalue < item.max_armorvalue) - c = item.armorvalue / (max(1, player.armorvalue + player.health)); + c = item.armorvalue / max(1, player.armorvalue * 2/3 + player.health * 1/3); if (item.health) if (player.health < item.max_health) c = item.health / max(1, player.health); - rating *= min(3, 1 + c); + rating *= min(2, c); return rating; } -- 2.39.2