seta hud_panel_phisics_update_interval 0.0666 "how often (in seconds) numeric values get updated on screen"
seta hud_panel_itemstime_progressbar_maxtime "30" "when left time is at least this amount, the status bar is full"
-seta hud_panel_itemstime_hidespawned "0" "hide items once they respawn"
+seta hud_panel_itemstime_hidespawned "1" "if 1 hide an item from the panel when all the occurrences of it are available again; if 2 hide it when at least one occurrence is available again"
// hud panel aliases
alias hud_panel_radar_rotate "toggle hud_panel_radar_rotation 0 1 2 3 4"
float autocvar_hud_panel_itemstime_progressbar_maxtime = 30;
string autocvar_hud_panel_itemstime_progressbar_name = "progressbar";
float autocvar_hud_panel_itemstime_progressbar_reduced;
-bool autocvar_hud_panel_itemstime_hidespawned = 0;
+bool autocvar_hud_panel_itemstime_hidespawned = 1;
int autocvar_hud_panel_itemstime_text = 1;
bool autocvar_hud_panel_infomessages;
bool autocvar_hud_panel_infomessages_flip;
vector color = '0 0 0';
float picalpha;
- if(autocvar_hud_panel_itemstime_hidespawned)
+ if(autocvar_hud_panel_itemstime_hidespawned == 2)
picalpha = 1;
else if(item_available)
{
float i;
float count = 0;
- if (!autocvar_hud_panel_itemstime_hidespawned)
+ if(autocvar_hud_panel_itemstime_hidespawned == 1)
for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
- count += (ItemsTime_time[i] != -1);
- else
+ count += (ItemsTime_time[i] > time || -ItemsTime_time[i] > time);
+ else if(autocvar_hud_panel_itemstime_hidespawned == 2)
for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
count += (ItemsTime_time[i] > time);
+ else
+ for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
+ count += (ItemsTime_time[i] != -1);
if (count == 0)
return;
for (i = 0; i < ITEMSTIME_MAXITEMS; ++i) {
if (ItemsTime_time[i] == -1)
continue;
-
+
float item_time = ItemsTime_time[i];
if(item_time < -1)
{
float f = (time - ItemsTime_availableTime[i]) * 2;
f = (f > 1) ? 0 : bound(0, f, 1);
- if(autocvar_hud_panel_itemstime_hidespawned)
- if(item_available)
+ if(autocvar_hud_panel_itemstime_hidespawned == 1)
+ if(!(ItemsTime_time[i] > time || -ItemsTime_time[i] > time))
+ continue;
+
+ if(autocvar_hud_panel_itemstime_hidespawned == 2)
+ if(!(ItemsTime_time[i] > time))
continue;
DrawItemsTimeItem(pos + eX * column * (itemstime_size.x + offset.x) + eY * row * (itemstime_size.y + offset.y), itemstime_size, ar, i, item_time, item_available, f);