]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Itemstime: initially set times for all items to -1 in the client otherwise filtered...
authorterencehill <piuntn@gmail.com>
Mon, 14 Dec 2015 17:48:42 +0000 (18:48 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 14 Dec 2015 17:48:42 +0000 (18:48 +0100)
qcsrc/common/mutators/mutator/itemstime.qc

index 975eb29f3ea12b755c156c6510f67c81dad0ffca..c9f6eaf77a13e716a4b82eb26b9fa7610bcccf64 100644 (file)
@@ -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;