]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove some code that now is useless
authorterencehill <piuntn@gmail.com>
Thu, 6 Aug 2015 21:12:28 +0000 (23:12 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 6 Aug 2015 21:12:28 +0000 (23:12 +0200)
qcsrc/server/t_items.qc

index d4ae97ea8101acc5c1d305305ebb7686bd801bb8..0f35eea87f9c4df4883a515c086575437f3b171a 100644 (file)
@@ -475,16 +475,7 @@ void Item_ItemsTime_SetTimesForPlayer(entity e)
        e.item_jetpack_time = it_jetpack_time;
        e.item_superweapons_time = it_superweapons_time;
 }
-bool Item_ItemsTime_UpdateTime_Check(float item_time, float t)
-{
-       if(t == 0 && item_time == -1)
-               return true;
-       if(t < 0) // negative means there's another available item of the same kind
-               t = -t;
-       if(time < t && (item_time <= time || t < item_time))
-               return true;
-       return false;
-}
+
 void Item_ItemsTime_UpdateTime(entity e, float t)
 {
        if(!autocvar_sv_itemstime)
@@ -495,16 +486,13 @@ void Item_ItemsTime_UpdateTime(entity e, float t)
                switch(e.items)
                {
                        case IT_STRENGTH://"item-invis"
-                               if(Item_ItemsTime_UpdateTime_Check(it_invisible_time, t))
-                                       it_invisible_time = t;
+                               it_invisible_time = t;
                                break;
                        case IT_NAILS://"item-extralife"
-                               if(Item_ItemsTime_UpdateTime_Check(it_extralife_time, t))
-                                       it_extralife_time = t;
+                               it_extralife_time = t;
                                break;
                        case IT_INVINCIBLE://"item-speed"
-                               if(Item_ItemsTime_UpdateTime_Check(it_speed_time, t))
-                                       it_speed_time = t;
+                               it_speed_time = t;
                                break;
                }
        }
@@ -514,37 +502,30 @@ void Item_ItemsTime_UpdateTime(entity e, float t)
                {
                        case IT_HEALTH:
                                // if(e.classname == "item_health_mega") // IT_HEALTH unequivocally identifies it
-                                       if(Item_ItemsTime_UpdateTime_Check(it_health_mega_time, t))
-                                               it_health_mega_time = t;
+                                       it_health_mega_time = t;
                                break;
                        case IT_ARMOR:
                                if(e.classname == "item_armor_large") // IT_ARMOR doesn't unequivocally identifies it
-                                       if(Item_ItemsTime_UpdateTime_Check(it_armor_large_time, t))
-                                               it_armor_large_time = t;
+                                       it_armor_large_time = t;
                                break;
                        case IT_STRENGTH://"item-strength"
-                               if(Item_ItemsTime_UpdateTime_Check(it_strength_time, t))
-                                       it_strength_time = t;
+                               it_strength_time = t;
                                break;
                        case IT_INVINCIBLE://"item-shield"
-                               if(Item_ItemsTime_UpdateTime_Check(it_shield_time, t))
-                                       it_shield_time = t;
+                               it_shield_time = t;
                                break;
                        default:
                                if(e.weapons & WEPSET_SUPERWEAPONS)
-                                       if(Item_ItemsTime_UpdateTime_Check(it_superweapons_time, t))
-                                               it_superweapons_time = t;
+                                       it_superweapons_time = t;
                }
        }
        switch(e.items)
        {
                case IT_FUEL_REGEN://"item-fuelregen"
-                       if(Item_ItemsTime_UpdateTime_Check(it_fuelregen_time, t))
-                               it_fuelregen_time = t;
+                       it_fuelregen_time = t;
                        break;
                case IT_JETPACK://"item-jetpack"
-                       if(Item_ItemsTime_UpdateTime_Check(it_jetpack_time, t))
-                               it_jetpack_time = t;
+                       it_jetpack_time = t;
                        break;
        }
 }