From: terencehill Date: Mon, 14 Dec 2015 17:48:42 +0000 (+0100) Subject: Itemstime: initially set times for all items to -1 in the client otherwise filtered... X-Git-Tag: xonotic-v0.8.2~1284^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d526f08373097308d2818d9f79000f1192ac525d;p=xonotic%2Fxonotic-data.pk3dir.git Itemstime: initially set times for all items to -1 in the client otherwise filtered out items (LMS filters them all out except extralife) appear as spawned in the panel (when hud_panel_itemstime_hidespawned is disabled) --- diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index 975eb29f3..c9f6eaf77 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -26,6 +26,17 @@ NET_HANDLE(itemstime, bool isNew) #endif #ifdef CSQC +void Item_ItemsTime_Init() +{ + FOREACH(Items, true, LAMBDA( + ItemsTime_time[it.m_id] = -1; + )); +} + +STATIC_INIT(ItemsTime_Init) { + Item_ItemsTime_Init(); +} + int autocvar_hud_panel_itemstime = 2; float autocvar_hud_panel_itemstime_dynamicsize = 1; float autocvar_hud_panel_itemstime_ratio = 2;