From: terencehill Date: Sat, 23 Jan 2016 23:55:04 +0000 (+0100) Subject: Avoid networking times of unsupported items X-Git-Tag: xonotic-v0.8.2~1214^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=28dcc434cc5e5346c7c33e5e2327beb4c0f0a329;p=xonotic%2Fxonotic-data.pk3dir.git Avoid networking times of unsupported items --- diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index 4f4f81fb6..6989f22b7 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -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]); )); }