]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide times of every item, not just armor and MH ones when itemstime is disabled by...
authorterencehill <piuntn@gmail.com>
Wed, 5 Aug 2015 21:51:44 +0000 (23:51 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 5 Aug 2015 22:06:04 +0000 (00:06 +0200)
qcsrc/server/t_items.qc

index 8b220661c3013d322bf047f642407ba6c4646082..d64ba6c837dc24b8ed81a3aed55160d3bbe8d606 100644 (file)
@@ -485,6 +485,9 @@ bool Item_ItemsTime_UpdateTime_Check(float item_time, float t)
 }
 void Item_ItemsTime_UpdateTime(entity e, float t)
 {
+       if(!autocvar_sv_itemstime)
+               return;
+
        if(g_instagib)
        {
                switch(e.items)
@@ -508,15 +511,11 @@ void Item_ItemsTime_UpdateTime(entity e, float t)
                switch(e.items)
                {
                        case IT_HEALTH:
-                               if(!autocvar_sv_itemstime)
-                                       break;
                                //if (e.classname == "item_health_mega")
                                        if(Item_ItemsTime_UpdateTime_Check(it_health_mega_time, t))
                                                it_health_mega_time = t;
                                break;
                        case IT_ARMOR:
-                               if(!autocvar_sv_itemstime)
-                                       break;
                                if (e.classname == "item_armor_large")
                                        if(Item_ItemsTime_UpdateTime_Check(it_armor_large_time, t))
                                                it_armor_large_time = t;
@@ -532,7 +531,7 @@ void Item_ItemsTime_UpdateTime(entity e, float t)
                        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)