]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Avoid networking times of unsupported items
authorterencehill <piuntn@gmail.com>
Sat, 23 Jan 2016 23:55:04 +0000 (00:55 +0100)
committerGitLab <gitlab@gitlab.com>
Thu, 28 Jan 2016 20:05:45 +0000 (20:05 +0000)
qcsrc/common/mutators/mutator/itemstime.qc

index 4f4f81fb6d5088d4e4fc1ae4a635ffecee765c29..6989f22b7d152c8954714f129f788b32aacd3f5b 100644 (file)
@@ -76,7 +76,7 @@ float it_times[Items_MAX];
 
 void Item_ItemsTime_Init()
 {
-    FOREACH(Items, true, LAMBDA(
+    FOREACH(Items, Item_ItemsTime_Allow(it, '0 0 0'), LAMBDA(
         it_times[it.m_id] = -1;
     ));
 }
@@ -88,21 +88,21 @@ STATIC_INIT(ItemsTime_Init) {
 
 void Item_ItemsTime_ResetTimes()
 {
-    FOREACH(Items, true, LAMBDA(
+    FOREACH(Items, Item_ItemsTime_Allow(it, '0 0 0'), LAMBDA(
         it_times[it.m_id] = (it_times[it.m_id] == -1) ? -1 : 0;
     ));
 }
 
 void Item_ItemsTime_ResetTimesForPlayer(entity e)
 {
-    FOREACH(Items, true, LAMBDA(
+    FOREACH(Items, Item_ItemsTime_Allow(it, '0 0 0'), LAMBDA(
         IT_Write(e, it.m_id, (it_times[it.m_id] == -1) ? -1 : 0);
     ));
 }
 
 void Item_ItemsTime_SetTimesForPlayer(entity e)
 {
-    FOREACH(Items, true, LAMBDA(
+    FOREACH(Items, Item_ItemsTime_Allow(it, '0 0 0'), LAMBDA(
         IT_Write(e, it.m_id, it_times[it.m_id]);
     ));
 }