]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make health value comparable to armor value (armor rating now takes less into account...
authorterencehill <piuntn@gmail.com>
Wed, 18 Jan 2017 13:58:51 +0000 (14:58 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 18 Jan 2017 13:58:51 +0000 (14:58 +0100)
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh
qcsrc/common/t_items.qc

index 9fcd076345213216f0c4d49fa6f2f8fbb6df1a08..a0e4ab27713a1406e0424fa91c9f6cd782ea8e97 100644 (file)
@@ -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)
 
index e32d0ebbdc0cc2f89cf2fd5309476ce1ef11cfa5..3332429dca40bc2aba72ebf658d34c1d5ed9828e 100644 (file)
@@ -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)
 
index a121d1568358846d2d05f88f32b176b10e991a38..e04b31d8c469bcd46de3df8c2766b5dd6946bd3a 100644 (file)
@@ -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;
 }