#endif
#ifdef CSQC
-void Item_ItemsTime_Init()
-{
- FOREACH(Items, true, {
- ItemsTime_time[it.m_id] = -1;
- });
- ItemsTime_time[Items_MAX] = -1;
-}
STATIC_INIT(ItemsTime_Init) {
- Item_ItemsTime_Init();
+ FOREACH(Items, true, {
+ ItemsTime_time[it.m_id] = -1;
+ });
+ ItemsTime_time[Items_MAX] = -1;
}
int autocvar_hud_panel_itemstime = 2;
// reserve one more spot for superweapons time
float it_times[Items_MAX + 1];
-void Item_ItemsTime_Init()
-{
- FOREACH(Items, Item_ItemsTime_Allow(it), {
- it_times[it.m_id] = -1;
- });
- it_times[Items_MAX] = -1;
-}
-
STATIC_INIT(ItemsTime_Init) {
- // items time
- Item_ItemsTime_Init();
+ FOREACH(Items, Item_ItemsTime_Allow(it), {
+ it_times[it.m_id] = -1;
+ });
+ it_times[Items_MAX] = -1;
}
void Item_ItemsTime_ResetTimes()
if (autocvar_hud_panel_itemstime_hidespawned == 2)
picalpha = 1;
else if (item_available)
- {
- float BLINK_FACTOR = 0.15;
- float BLINK_BASE = 0.85;
- float BLINK_FREQ = 5;
- picalpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
- }
+ picalpha = blink(0.85, 0.15, 5);
else
picalpha = 0.5;
t = floor(item_time - time + 0.999);