Merge branch 'master' into terencehill/itemstime
authorMario <zacjardine@y7mail.com>
Sun, 10 May 2015 23:19:58 +0000 (09:19 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 10 May 2015 23:19:58 +0000 (09:19 +1000)
Conflicts:
qcsrc/client/autocvars.qh
qcsrc/client/hud.qh
qcsrc/common/constants.qh
qcsrc/common/util.qh
qcsrc/menu/classes.c
qcsrc/server/defs.qh

25 files changed:
1  2 
_hud_descriptions.cfg
defaultXonotic.cfg
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/constants.qh
qcsrc/common/stats.qh
qcsrc/menu/classes.inc
qcsrc/menu/xonotic/dialog_hudpanel_itemstime.c
qcsrc/menu/xonotic/mainwindow.qc
qcsrc/server/cl_client.qc
qcsrc/server/command/vote.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/t_items.qc
qcsrc/server/t_items.qh
qcsrc/server/waypointsprites.qc

Simple merge
Simple merge
diff --cc hud_luma.cfg
index 0000000,4f80150..3c3d0ee
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,312 +1,330 @@@
+ seta hud_skin "luma"
+ seta hud_panel_bg "0"
+ seta hud_panel_bg_color "0 0.14 0.25"
+ seta hud_panel_bg_color_team "1"
+ seta hud_panel_bg_alpha "1"
+ seta hud_panel_bg_border "2"
+ seta hud_panel_bg_padding "3"
+ seta hud_panel_fg_alpha "1"
+ seta hud_dock "0"
+ seta hud_dock_color "0 0 0"
+ seta hud_dock_color_team "1"
+ seta hud_dock_alpha "1"
+ seta hud_progressbar_alpha "0.600000"
+ seta hud_progressbar_health_color "0.83 0.12 0"
+ seta hud_progressbar_armor_color "0.28 0.8 0"
+ seta hud_progressbar_fuel_color "0.77 0.67 0"
+ seta hud_progressbar_strength_color "0.86 0.35 0"
+ seta hud_progressbar_shield_color "0.28 0.8 0"
+ seta hud_progressbar_superweapons_color "0.77 0.67 0"
+ seta hud_progressbar_nexball_color "0.2 0.65 0.93"
+ seta hud_progressbar_speed_color "0.77 0.67 0"
+ seta hud_progressbar_acceleration_color "0.2 0.65 0.93"
+ seta hud_progressbar_acceleration_neg_color "0.86 0.35 0"
+ seta _hud_panelorder "15 12 9 5 10 6 14 0 7 4 11 2 1 3 8 13 16 "
+ seta hud_configure_grid "1"
+ seta hud_configure_grid_xsize "0.005000"
+ seta hud_configure_grid_ysize "0.005000"
+ seta hud_panel_weapons 1
+ seta hud_panel_weapons_pos "0.965000 0.120000"
+ seta hud_panel_weapons_size "0.035000 0.770000"
+ seta hud_panel_weapons_bg "border_default_east"
+ seta hud_panel_weapons_bg_color ""
+ seta hud_panel_weapons_bg_color_team ""
+ seta hud_panel_weapons_bg_alpha ""
+ seta hud_panel_weapons_bg_border ""
+ seta hud_panel_weapons_bg_padding "0"
+ seta hud_panel_weapons_accuracy "0"
+ seta hud_panel_weapons_label "1"
+ seta hud_panel_weapons_label_scale "0.3"
+ seta hud_panel_weapons_complainbubble "1"
+ seta hud_panel_weapons_complainbubble_padding "0"
+ seta hud_panel_weapons_complainbubble_time "0"
+ seta hud_panel_weapons_complainbubble_fadetime "1"
+ seta hud_panel_weapons_complainbubble_color_outofammo "0.8 0.11 0"
+ seta hud_panel_weapons_complainbubble_color_donthave "0.88 0.75 0"
+ seta hud_panel_weapons_complainbubble_color_unavailable "0 0.71 1"
+ seta hud_panel_weapons_ammo "0"
+ seta hud_panel_weapons_ammo_color "0.58 1 0.04"
+ seta hud_panel_weapons_ammo_alpha "1"
+ seta hud_panel_weapons_aspect "1"
+ seta hud_panel_weapons_timeout "1"
+ seta hud_panel_weapons_timeout_effect "1"
+ seta hud_panel_weapons_timeout_fadebgmin "0.4"
+ seta hud_panel_weapons_timeout_fadefgmin "0.4"
+ seta hud_panel_weapons_timeout_speed_in "0.25"
+ seta hud_panel_weapons_timeout_speed_out "0.75"
+ seta hud_panel_weapons_onlyowned "1"
+ seta hud_panel_ammo 1
+ seta hud_panel_ammo_pos "0.330000 0.865000"
+ seta hud_panel_ammo_size "0.340000 0.060000"
+ seta hud_panel_ammo_bg "border_tab_south"
+ seta hud_panel_ammo_bg_color ""
+ seta hud_panel_ammo_bg_color_team ""
+ seta hud_panel_ammo_bg_alpha ""
+ seta hud_panel_ammo_bg_border ""
+ seta hud_panel_ammo_bg_padding "4"
+ seta hud_panel_ammo_onlycurrent "0"
+ seta hud_panel_ammo_noncurrent_alpha "0.6"
+ seta hud_panel_ammo_noncurrent_scale "0.4"
+ seta hud_panel_ammo_iconalign "0"
+ seta hud_panel_ammo_progressbar "0"
+ seta hud_panel_ammo_progressbar_name "progressbar"
+ seta hud_panel_ammo_progressbar_xoffset "0"
+ seta hud_panel_ammo_text "1"
+ seta hud_panel_powerups 1
+ seta hud_panel_powerups_pos "0 0.270000"
+ seta hud_panel_powerups_size "0.040000 0.415000"
+ seta hud_panel_powerups_bg "border_default_west"
+ seta hud_panel_powerups_bg_color ""
+ seta hud_panel_powerups_bg_color_team ""
+ seta hud_panel_powerups_bg_alpha ""
+ seta hud_panel_powerups_bg_border ""
+ seta hud_panel_powerups_bg_padding "2"
+ seta hud_panel_powerups_flip "1"
+ seta hud_panel_powerups_iconalign "1"
+ seta hud_panel_powerups_baralign "1"
+ seta hud_panel_powerups_progressbar "1"
+ seta hud_panel_powerups_progressbar_strength "progressbar"
+ seta hud_panel_powerups_progressbar_shield "progressbar"
+ seta hud_panel_powerups_progressbar_superweapons "progressbar"
+ seta hud_panel_powerups_text "1"
+ seta hud_panel_healtharmor 1
+ seta hud_panel_healtharmor_pos "0.300000 0.925000"
+ seta hud_panel_healtharmor_size "0.400000 0.070000"
+ seta hud_panel_healtharmor_bg "border_default_south"
+ seta hud_panel_healtharmor_bg_color ""
+ seta hud_panel_healtharmor_bg_color_team ""
+ seta hud_panel_healtharmor_bg_alpha ""
+ seta hud_panel_healtharmor_bg_border "4"
+ seta hud_panel_healtharmor_bg_padding ""
+ seta hud_panel_healtharmor_flip "0"
+ seta hud_panel_healtharmor_iconalign "3"
+ seta hud_panel_healtharmor_baralign "3"
+ seta hud_panel_healtharmor_progressbar "1"
+ seta hud_panel_healtharmor_progressbar_health "progressbar"
+ seta hud_panel_healtharmor_progressbar_armor "progressbar"
+ seta hud_panel_healtharmor_progressbar_gfx "1"
+ seta hud_panel_healtharmor_progressbar_gfx_smooth "2"
+ seta hud_panel_healtharmor_text "1"
+ seta hud_panel_notify 1
+ seta hud_panel_notify_pos "0.730000 0.800000"
+ seta hud_panel_notify_size "0.265000 0.200000"
+ seta hud_panel_notify_bg "0"
+ seta hud_panel_notify_bg_color ""
+ seta hud_panel_notify_bg_color_team ""
+ seta hud_panel_notify_bg_alpha ""
+ seta hud_panel_notify_bg_border ""
+ seta hud_panel_notify_bg_padding ""
+ seta hud_panel_notify_flip "0"
+ seta hud_panel_notify_fontsize "0.8"
+ seta hud_panel_notify_time "10"
+ seta hud_panel_notify_fadetime "3"
+ seta hud_panel_notify_icon_aspect "1"
+ seta hud_panel_timer 1
+ seta hud_panel_timer_pos "0.456000 0"
+ seta hud_panel_timer_size "0.088000 0.030000"
+ seta hud_panel_timer_bg "border_plain_north"
+ seta hud_panel_timer_bg_color ""
+ seta hud_panel_timer_bg_color_team ""
+ seta hud_panel_timer_bg_alpha ""
+ seta hud_panel_timer_bg_border ""
+ seta hud_panel_timer_bg_padding "0"
+ seta hud_panel_timer_increment "0"
+ seta hud_panel_radar 1
+ seta hud_panel_radar_pos "0 0"
+ seta hud_panel_radar_size "0.200000 0.250000"
+ seta hud_panel_radar_bg "border_corner_northwest"
+ seta hud_panel_radar_bg_color ""
+ seta hud_panel_radar_bg_color_team ""
+ seta hud_panel_radar_bg_alpha ""
+ seta hud_panel_radar_bg_border ""
+ seta hud_panel_radar_bg_padding "1"
+ seta hud_panel_radar_foreground_alpha "1"
+ seta hud_panel_radar_rotation "0"
+ seta hud_panel_radar_zoommode "0"
+ seta hud_panel_radar_scale "8192"
+ seta hud_panel_radar_maximized_scale "5120"
+ seta hud_panel_radar_maximized_size "0.5 0.5"
+ seta hud_panel_radar_maximized_rotation "1"
+ seta hud_panel_radar_maximized_zoommode "3"
+ seta hud_panel_score 1
+ seta hud_panel_score_pos "0.880000 0"
+ seta hud_panel_score_size "0.120000 0.080000"
+ seta hud_panel_score_bg "border_corner_northeast"
+ seta hud_panel_score_bg_color ""
+ seta hud_panel_score_bg_color_team ""
+ seta hud_panel_score_bg_alpha ""
+ seta hud_panel_score_bg_border ""
+ seta hud_panel_score_bg_padding "1"
+ seta hud_panel_score_rankings "1"
+ seta hud_panel_racetimer 1
+ seta hud_panel_racetimer_pos "0.360000 0.110000"
+ seta hud_panel_racetimer_size "0.280000 0.090000"
+ seta hud_panel_racetimer_bg "0"
+ seta hud_panel_racetimer_bg_color ""
+ seta hud_panel_racetimer_bg_color_team ""
+ seta hud_panel_racetimer_bg_alpha ""
+ seta hud_panel_racetimer_bg_border ""
+ seta hud_panel_racetimer_bg_padding ""
+ seta hud_panel_vote 1
+ seta hud_panel_vote_pos "0.740000 0.690000"
+ seta hud_panel_vote_size "0.190000 0.090000"
+ seta hud_panel_vote_bg " "
+ seta hud_panel_vote_bg_color ""
+ seta hud_panel_vote_bg_color_team ""
+ seta hud_panel_vote_bg_alpha ""
+ seta hud_panel_vote_bg_border ""
+ seta hud_panel_vote_bg_padding ""
+ seta hud_panel_vote_alreadyvoted_alpha "0.700000"
+ seta hud_panel_modicons 1
+ seta hud_panel_modicons_pos "0.370000 0.030000"
+ seta hud_panel_modicons_size "0.260000 0.07000"
+ seta hud_panel_modicons_bg "border_fading_north"
+ seta hud_panel_modicons_bg_color ""
+ seta hud_panel_modicons_bg_color_team ""
+ seta hud_panel_modicons_bg_alpha ""
+ seta hud_panel_modicons_bg_border "4"
+ seta hud_panel_modicons_bg_padding "0"
+ seta hud_panel_modicons_ca_layout "1"
+ seta hud_panel_modicons_dom_layout "1"
+ seta hud_panel_modicons_freezetag_layout "1"
+ seta hud_panel_pressedkeys 1
+ seta hud_panel_pressedkeys_pos "0.445000 0.730000"
+ seta hud_panel_pressedkeys_size "0.110000 0.090000"
+ seta hud_panel_pressedkeys_bg " "
+ seta hud_panel_pressedkeys_bg_color ""
+ seta hud_panel_pressedkeys_bg_color_team ""
+ seta hud_panel_pressedkeys_bg_alpha ""
+ seta hud_panel_pressedkeys_bg_border ""
+ seta hud_panel_pressedkeys_bg_padding "1"
+ seta hud_panel_pressedkeys_aspect "1.600000"
+ seta hud_panel_pressedkeys_attack "0"
+ seta hud_panel_chat 1
+ seta hud_panel_chat_pos "0.010000 0.700000"
+ seta hud_panel_chat_size "0.460000 0.190000"
+ seta hud_panel_chat_bg "0"
+ seta hud_panel_chat_bg_color ""
+ seta hud_panel_chat_bg_color_team ""
+ seta hud_panel_chat_bg_alpha ""
+ seta hud_panel_chat_bg_border ""
+ seta hud_panel_chat_bg_padding ""
+ seta hud_panel_engineinfo 0
+ seta hud_panel_engineinfo_pos "0.930000 0.970000"
+ seta hud_panel_engineinfo_size "0.070000 0.030000"
+ seta hud_panel_engineinfo_bg "0"
+ seta hud_panel_engineinfo_bg_color ""
+ seta hud_panel_engineinfo_bg_color_team ""
+ seta hud_panel_engineinfo_bg_alpha ""
+ seta hud_panel_engineinfo_bg_border ""
+ seta hud_panel_engineinfo_bg_padding ""
+ seta hud_panel_engineinfo_framecounter_time "0.1"
+ seta hud_panel_engineinfo_framecounter_decimals "0"
+ seta hud_panel_infomessages 1
+ seta hud_panel_infomessages_pos "0.720000 0.100000"
+ seta hud_panel_infomessages_size "0.280000 0.080000"
+ seta hud_panel_infomessages_bg "0"
+ seta hud_panel_infomessages_bg_color ""
+ seta hud_panel_infomessages_bg_color_team ""
+ seta hud_panel_infomessages_bg_alpha ""
+ seta hud_panel_infomessages_bg_border ""
+ seta hud_panel_infomessages_bg_padding "0"
+ seta hud_panel_infomessages_flip "1"
+ seta hud_panel_physics 3
+ seta hud_panel_physics_pos "0.410000 0.630000"
+ seta hud_panel_physics_size "0.180000 0.080000"
+ seta hud_panel_physics_bg "0"
+ seta hud_panel_physics_bg_color ""
+ seta hud_panel_physics_bg_color_team ""
+ seta hud_panel_physics_bg_alpha "0.700000"
+ seta hud_panel_physics_bg_border ""
+ seta hud_panel_physics_bg_padding ""
+ seta hud_panel_physics_speed_unit "1"
+ seta hud_panel_physics_speed_unit_show "1"
+ seta hud_panel_physics_speed_max "1800"
+ seta hud_panel_physics_speed_vertical "0"
+ seta hud_panel_physics_topspeed "1"
+ seta hud_panel_physics_topspeed_time "4"
+ seta hud_panel_physics_acceleration_max "1.5"
+ seta hud_panel_physics_acceleration_vertical "0"
+ seta hud_panel_physics_flip "0"
+ seta hud_panel_physics_baralign "0"
+ seta hud_panel_physics_progressbar "1"
+ seta hud_panel_physics_acceleration_progressbar_mode "0"
+ seta hud_panel_physics_acceleration_progressbar_scale "1"
+ seta hud_panel_physics_acceleration_progressbar_nonlinear "0"
+ seta hud_panel_physics_text "1"
+ seta hud_panel_physics_text_scale "0.7"
+ seta hud_panel_centerprint 1
+ seta hud_panel_centerprint_pos "0.175000 0.220000"
+ seta hud_panel_centerprint_size "0.650000 0.220000"
+ seta hud_panel_centerprint_bg "0"
+ seta hud_panel_centerprint_bg_color ""
+ seta hud_panel_centerprint_bg_color_team ""
+ seta hud_panel_centerprint_bg_alpha ""
+ seta hud_panel_centerprint_bg_border ""
+ seta hud_panel_centerprint_bg_padding ""
+ seta hud_panel_centerprint_align "0.5"
+ seta hud_panel_centerprint_flip "0"
+ seta hud_panel_centerprint_fontscale "1"
+ seta hud_panel_centerprint_time "3"
+ seta hud_panel_centerprint_fade_in "0.2"
+ seta hud_panel_centerprint_fade_out "0.5"
+ seta hud_panel_centerprint_fade_subsequent "1"
+ seta hud_panel_centerprint_fade_subsequent_passone "3"
+ seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
+ seta hud_panel_centerprint_fade_subsequent_passtwo "10"
+ seta hud_panel_centerprint_fade_subsequent_passtwo_minalpha "0.5"
+ seta hud_panel_centerprint_fade_subsequent_minfontsize "0.75"
+ seta hud_panel_centerprint_fade_minfontsize "0"
+ seta hud_panel_buffs 1
+ seta hud_panel_buffs_pos "0.435000 0.840000"
+ seta hud_panel_buffs_size "0.125000 0.035000"
+ seta hud_panel_buffs_bg "0"
+ seta hud_panel_buffs_bg_color ""
+ seta hud_panel_buffs_bg_color_team ""
+ seta hud_panel_buffs_bg_alpha ""
+ seta hud_panel_buffs_bg_border ""
+ seta hud_panel_buffs_bg_padding ""
++seta hud_panel_itemstime 2
++seta hud_panel_itemstime_pos "0.030000 0.260000"
++seta hud_panel_itemstime_size "0.070000 0.230000"
++seta hud_panel_itemstime_bg "border_itemstime"
++seta hud_panel_itemstime_bg_color ""
++seta hud_panel_itemstime_bg_color_team ""
++seta hud_panel_itemstime_bg_alpha ""
++seta hud_panel_itemstime_bg_border ""
++seta hud_panel_itemstime_bg_padding ""
++seta hud_panel_itemstime_iconalign "0"
++seta hud_panel_itemstime_progressbar "0"
++seta hud_panel_itemstime_progressbar_name "progressbar"
++seta hud_panel_itemstime_progressbar_reduced "0"
++seta hud_panel_itemstime_showspawned "0"
++seta hud_panel_itemstime_text "1"
++seta hud_panel_itemstime_ratio "2"
++seta hud_panel_itemstime_size_dinamic "1"
++
+ menu_sync
diff --cc hud_luminos.cfg
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc hud_nexuiz.cfg
Simple merge
@@@ -170,7 -173,6 +173,7 @@@ float autocvar_g_waypointsprite_edgeoff
  float autocvar_g_waypointsprite_edgeoffset_right;
  float autocvar_g_waypointsprite_edgeoffset_top;
  float autocvar_g_waypointsprite_fontsize;
- float autocvar_g_waypointsprite_itemstime;
++int autocvar_g_waypointsprite_itemstime;
  float autocvar_g_waypointsprite_minalpha;
  float autocvar_g_waypointsprite_minscale;
  float autocvar_g_waypointsprite_normdistance;
@@@ -264,24 -268,14 +269,24 @@@ bool autocvar_hud_panel_healtharmor_pro
  float autocvar_hud_panel_healtharmor_progressbar_gfx_damage;
  float autocvar_hud_panel_healtharmor_progressbar_gfx_lowhealth;
  float autocvar_hud_panel_healtharmor_progressbar_gfx_smooth;
- float autocvar_hud_panel_healtharmor_text;
- float autocvar_hud_panel_infomessages;
- float autocvar_hud_panel_infomessages_flip;
- float autocvar_hud_panel_itemstime;
+ int autocvar_hud_panel_healtharmor_text;
++int autocvar_hud_panel_itemstime;
 +float autocvar_hud_panel_itemstime_size_dinamic;
 +float autocvar_hud_panel_itemstime_ratio;
- float autocvar_hud_panel_itemstime_iconalign;
- float autocvar_hud_panel_itemstime_progressbar;
++int autocvar_hud_panel_itemstime_iconalign;
++bool autocvar_hud_panel_itemstime_progressbar;
 +float autocvar_hud_panel_itemstime_progressbar_maxtime;
 +string autocvar_hud_panel_itemstime_progressbar_name;
 +float autocvar_hud_panel_itemstime_progressbar_reduced;
- float autocvar_hud_panel_itemstime_showspawned;
- float autocvar_hud_panel_itemstime_text;
- float autocvar_hud_panel_modicons;
- float autocvar_hud_panel_modicons_ca_layout;
- float autocvar_hud_panel_modicons_dom_layout;
- float autocvar_hud_panel_modicons_freezetag_layout;
- float autocvar_hud_panel_notify;
++bool autocvar_hud_panel_itemstime_showspawned;
++int autocvar_hud_panel_itemstime_text;
+ bool autocvar_hud_panel_infomessages;
+ bool autocvar_hud_panel_infomessages_flip;
+ bool autocvar_hud_panel_modicons;
+ int autocvar_hud_panel_modicons_ca_layout;
+ int autocvar_hud_panel_modicons_dom_layout;
+ int autocvar_hud_panel_modicons_freezetag_layout;
+ bool autocvar_hud_panel_notify;
  float autocvar_hud_panel_notify_fadetime;
  float autocvar_hud_panel_notify_flip;
  float autocvar_hud_panel_notify_fontsize;
@@@ -4470,214 -4552,6 +4552,215 @@@ void HUD_Buffs(void
        draw_endBoldFont();
  }
  
-               if not((autocvar_hud_panel_itemstime == 1 && spectatee_status != 0)
-               || (autocvar_hud_panel_itemstime == 2 && (spectatee_status != 0 || warmup_stage)))
-                       return;
 +// ItemsTime (#XX)
 +//
 +const float ITEMSTIME_MAXITEMS = 10;
 +float ItemsTime_time[ITEMSTIME_MAXITEMS];
 +string GetItemsTimePicture(float i)
 +{
 +      switch(i)
 +      {
 +              case 0: return "item_large_armor";
 +              case 1: return "item_mega_health";
 +              case 2: return "item_strength";
 +              case 3: return "item_shield";
 +              case 4: return "item_mega_health";
 +              case 5: return "item_strength";
 +              case 6: return "item_shield";
 +              case 7: return "fuelregen";
 +              case 8: return "jetpack";
 +              case 9: return "superweapons";
 +              default: return "";
 +      }
 +}
 +
 +void DrawItemsTimeItem(vector myPos, vector mySize, float ar, float itemcode)
 +{
 +      float t = 0;
 +      vector color = '0 0 0';
 +      float picalpha;
 +      if(ItemsTime_time[itemcode] <= time)
 +      {
 +              float BLINK_FACTOR = 0.15;
 +              float BLINK_BASE = 0.85;
 +              float BLINK_FREQ = 5;
 +              picalpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
 +      }
 +      else
 +      {
 +              picalpha = 1;
 +              t = floor(ItemsTime_time[itemcode] - time + 0.999);
 +              if(t < 5)
 +                      color = '0.7 0 0';
 +              else if(t < 10)
 +                      color = '0.7 0.7 0';
 +              else
 +                      color = '1 1 1';
 +      }
 +
 +      vector picpos, numpos;
 +      if(autocvar_hud_panel_itemstime_iconalign)
 +      {
 +              numpos = myPos;
 +              picpos = myPos + eX * (ar - 1) * mySize_y;
 +      }
 +      else
 +      {
 +              numpos = myPos + eX * mySize_y;
 +              picpos = myPos;
 +      }
 +
 +      if(t > 0 && autocvar_hud_panel_itemstime_progressbar)
 +      {
 +              vector p_pos, p_size;
 +              if(autocvar_hud_panel_itemstime_progressbar_reduced)
 +              {
 +                      p_pos = numpos;
 +                      p_size = eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y;
 +              }
 +              else
 +              {
 +                      p_pos = myPos;
 +                      p_size = mySize;
 +              }
 +              HUD_Panel_DrawProgressBar(p_pos, p_size, autocvar_hud_panel_itemstime_progressbar_name, t/autocvar_hud_panel_itemstime_progressbar_maxtime, 0, autocvar_hud_panel_itemstime_iconalign, color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
 +      }
 +
 +      if(t > 0 && autocvar_hud_panel_itemstime_text)
 +              drawstring_aspect(numpos, ftos(t), eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL);
 +      drawpic_aspect_skin(picpos, GetItemsTimePicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL);
 +}
 +
 +void HUD_ItemsTime(void)
 +{
 +      if(!autocvar__hud_configure)
 +      {
++              if(!(
++                      (autocvar_hud_panel_itemstime == 1 && spectatee_status != 0)
++              ||      (autocvar_hud_panel_itemstime == 2 && (spectatee_status != 0 || warmup_stage))
++                      )) { return; }
 +
 +              ItemsTime_time[0] = getstatf(STAT_ARMOR_LARGE_TIME);
 +              ItemsTime_time[1] = getstatf(STAT_HEALTH_MEGA_TIME);
 +              ItemsTime_time[2] = getstatf(STAT_INVISIBLE_TIME);
 +              ItemsTime_time[3] = getstatf(STAT_SPEED_TIME);
 +              ItemsTime_time[4] = getstatf(STAT_EXTRALIFE_TIME);
 +              ItemsTime_time[5] = getstatf(STAT_STRENGTH_TIME);
 +              ItemsTime_time[6] = getstatf(STAT_SHIELD_TIME);
 +              ItemsTime_time[7] = getstatf(STAT_FUELREGEN_TIME);
 +              ItemsTime_time[8] = getstatf(STAT_JETPACK_TIME);
 +              ItemsTime_time[9] = getstatf(STAT_SUPERWEAPONS_TIME);
 +      }
 +      else
 +      {
 +              // do not show here mutator-dependent items
 +              ItemsTime_time[0] = time + 0;
 +              ItemsTime_time[1] = time + 8;
 +              ItemsTime_time[2] = -1; // mutator-dependent
 +              ItemsTime_time[3] = -1; // mutator-dependent
 +              ItemsTime_time[4] = -1; // mutator-dependent
 +              ItemsTime_time[5] = time + 0;
 +              ItemsTime_time[6] = time + 4;
 +              ItemsTime_time[7] = time + 49;
 +              ItemsTime_time[8] = -1;
 +              ItemsTime_time[9] = time + 28;
 +      }
 +
 +      float i;
 +      float count = 0;
 +      if (autocvar_hud_panel_itemstime_showspawned)
 +              for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
 +                      count += (ItemsTime_time[i] != -1);
 +      else
 +              for (i = 0; i < ITEMSTIME_MAXITEMS; ++i)
 +                      count += (ItemsTime_time[i] > time);
 +      if (count == 0)
 +              return;
 +
 +      HUD_Panel_UpdateCvars();
 +
 +      vector pos, mySize;
 +      pos = panel_pos;
 +      mySize = panel_size;
 +
 +      if(panel_bg_padding)
 +      {
 +              pos += '1 1 0' * panel_bg_padding;
 +              mySize -= '2 2 0' * panel_bg_padding;
 +      }
 +
 +      float rows, columns;
 +      float ar = max(2, autocvar_hud_panel_itemstime_ratio) + 1;
 +      rows = mySize_y/mySize_x;
 +      rows = bound(1, floor((sqrt(4 * ar * rows * count + rows * rows) + rows + 0.5) / 2), count);
 +
 +      columns = ceil(count/rows);
 +
 +      vector itemstime_size;
 +      itemstime_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
 +
 +      vector offset = '0 0 0';
 +      float newSize;
 +      if(autocvar_hud_panel_itemstime_size_dinamic)
 +      {
 +              if(autocvar__hud_configure)
 +              if(menu_enabled != 2)
 +                      HUD_Panel_DrawBg(1); // also draw the bg of the entire panel
 +
 +              // reduce panel to avoid spacing items
 +              if(itemstime_size_x / itemstime_size_y < ar)
 +              {
 +                      newSize = rows * itemstime_size_x / ar;
 +                      pos_y += (mySize_y - newSize) / 2;
 +                      mySize_y = newSize;
 +                      itemstime_size_y = mySize_y / rows;
 +              }
 +              else
 +              {
 +                      newSize = columns * itemstime_size_y * ar;
 +                      pos_x += (mySize_x - newSize) / 2;
 +                      mySize_x = newSize;
 +                      itemstime_size_x = mySize_x / columns;
 +              }
 +              panel_pos = pos - '1 1 0' * panel_bg_padding;
 +              panel_size = mySize + '2 2 0' * panel_bg_padding;
 +      }
 +      else
 +      {
 +              if(itemstime_size_x/itemstime_size_y > ar)
 +              {
 +                      newSize = ar * itemstime_size_y;
 +                      offset_x = itemstime_size_x - newSize;
 +                      pos_x += offset_x/2;
 +                      itemstime_size_x = newSize;
 +              }
 +              else
 +              {
 +                      newSize = 1/ar * itemstime_size_x;
 +                      offset_y = itemstime_size_y - newSize;
 +                      pos_y += offset_y/2;
 +                      itemstime_size_y = newSize;
 +              }
 +      }
 +
 +      HUD_Panel_DrawBg(1);
 +
 +      float row = 0, column = 0;
 +      for (i = 0; i < ITEMSTIME_MAXITEMS; ++i) {
 +              if (ItemsTime_time[i] == -1)
 +                      continue;
 +              if (!autocvar_hud_panel_itemstime_showspawned)
 +                      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);
 +              ++row;
 +              if(row >= rows)
 +              {
 +                      row = 0;
 +                      column = column + 1;
 +              }
 +      }
 +}
  
  /*
  ==================
@@@ -96,45 -115,64 +115,65 @@@ class(HUDPanel) .void() panel_draw
  
  float current_player;
  
- #define HUD_PANELS \
-       HUD_PANEL(WEAPONS      , HUD_Weapons      , weapons) \
-       HUD_PANEL(AMMO         , HUD_Ammo         , ammo) \
-       HUD_PANEL(POWERUPS     , HUD_Powerups     , powerups) \
-       HUD_PANEL(HEALTHARMOR  , HUD_HealthArmor  , healtharmor) \
-       HUD_PANEL(NOTIFY       , HUD_Notify       , notify) \
-       HUD_PANEL(TIMER        , HUD_Timer        , timer) \
-       HUD_PANEL(RADAR        , HUD_Radar        , radar) \
-       HUD_PANEL(SCORE        , HUD_Score        , score) \
-       HUD_PANEL(RACETIMER    , HUD_RaceTimer    , racetimer) \
-       HUD_PANEL(VOTE         , HUD_Vote         , vote) \
-       HUD_PANEL(MODICONS     , HUD_ModIcons     , modicons) \
-       HUD_PANEL(PRESSEDKEYS  , HUD_PressedKeys  , pressedkeys) \
-       HUD_PANEL(CHAT         , HUD_Chat         , chat) \
-       HUD_PANEL(ENGINEINFO   , HUD_EngineInfo   , engineinfo) \
-       HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages) \
-       HUD_PANEL(PHYSICS      , HUD_Physics      , physics) \
-       HUD_PANEL(CENTERPRINT  , HUD_CenterPrint  , centerprint) \
-       HUD_PANEL(BUFFS        , HUD_Buffs        , buffs) \
+ float GetPlayerColorForce(int i);
+ float stringwidth_colors(string s, vector theSize);
+ int GetPlayerColor(int i);
+ string GetPlayerName(int i);
+ float stringwidth_nocolors(string s, vector theSize);
+ void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
+ // prev_* vars contain the health/armor at the previous FRAME
+ // set to -1 when player is dead or was not playing
+ int prev_health, prev_armor;
+ float health_damagetime, armor_damagetime;
+ int health_beforedamage, armor_beforedamage;
+ // old_p_* vars keep track of previous values when smoothing value changes of the progressbar
+ int old_p_health, old_p_armor;
+ float old_p_healthtime, old_p_armortime;
+ // prev_p_* vars contain the health/armor progressbar value at the previous FRAME
+ // set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
+ int prev_p_health, prev_p_armor;
+ #define HUD_PANELS(HUD_PANEL)                                                                                                                                                                                 \
+       HUD_PANEL(WEAPONS      , HUD_Weapons      , weapons)                                                                                                                    \
+       HUD_PANEL(AMMO         , HUD_Ammo         , ammo)                                                                                                                               \
+       HUD_PANEL(POWERUPS     , HUD_Powerups     , powerups)                                                                                                                   \
+       HUD_PANEL(HEALTHARMOR  , HUD_HealthArmor  , healtharmor)                                                                                                                \
+       HUD_PANEL(NOTIFY       , HUD_Notify       , notify)                                                                                                                     \
+       HUD_PANEL(TIMER        , HUD_Timer        , timer)                                                                                                                              \
+       HUD_PANEL(RADAR        , HUD_Radar        , radar)                                                                                                                              \
+       HUD_PANEL(SCORE        , HUD_Score        , score)                                                                                                                              \
+       HUD_PANEL(RACETIMER    , HUD_RaceTimer    , racetimer)                                                                                                                  \
+       HUD_PANEL(VOTE         , HUD_Vote         , vote)                                                                                                                               \
+       HUD_PANEL(MODICONS     , HUD_ModIcons     , modicons)                                                                                                                   \
+       HUD_PANEL(PRESSEDKEYS  , HUD_PressedKeys  , pressedkeys)                                                                                                                \
+       HUD_PANEL(CHAT         , HUD_Chat         , chat)                                                                                                                               \
+       HUD_PANEL(ENGINEINFO   , HUD_EngineInfo   , engineinfo)                                                                                                                 \
+       HUD_PANEL(INFOMESSAGES , HUD_InfoMessages , infomessages)                                                                                                               \
+       HUD_PANEL(PHYSICS      , HUD_Physics      , physics)                                                                                                                    \
+       HUD_PANEL(CENTERPRINT  , HUD_CenterPrint  , centerprint)                                                                                                                \
 -      HUD_PANEL(BUFFS        , HUD_Buffs        , buffs)
++      HUD_PANEL(BUFFS        , HUD_Buffs        , buffs)                                                                                                                              \
 +      HUD_PANEL(ITEMSTIME    , HUD_ItemsTime    , itemstime)
  
- #define HUD_PANEL(NAME,draw_func,name) \
-       float HUD_PANEL_##NAME; \
-       void draw_func(void); \
-       void RegisterHUD_Panel_##NAME() \
-       { \
-               HUD_PANEL_LAST = HUD_PANEL_##NAME = HUD_PANEL_NUM; \
-               entity hud_panelent = spawn(); \
-               hud_panel[HUD_PANEL_##NAME] = hud_panelent; \
-               hud_panelent.classname = "hud_panel"; \
-               hud_panelent.panel_name = #name; \
-               hud_panelent.panel_id = HUD_PANEL_##NAME; \
-               hud_panelent.panel_draw = draw_func; \
-               ++HUD_PANEL_NUM; \
-       } \
+ #define HUD_PANEL(NAME, draw_func, name)                                                                                                                                                      \
+       int HUD_PANEL_##NAME;                                                                                                                                                                                   \
+       void draw_func(void);                                                                                                                                                                                   \
+       void RegisterHUD_Panel_##NAME() {                                                                                                                                                               \
+               HUD_PANEL_LAST = HUD_PANEL_##NAME = HUD_PANEL_NUM;                                                                                                                      \
+               entity hud_panelent = spawn();                                                                                                                                                          \
+               hud_panel[HUD_PANEL_##NAME] = hud_panelent;                                                                                                                             \
+               hud_panelent.classname = "hud_panel";                                                                                                                                           \
+               hud_panelent.panel_name = #name;                                                                                                                                                        \
+               hud_panelent.panel_id = HUD_PANEL_##NAME;                                                                                                                                       \
+               hud_panelent.panel_draw = draw_func;                                                                                                                                            \
+               HUD_PANEL_NUM++;                                                                                                                                                                                        \
+       }                                                                                                                                                                                                                               \
        ACCUMULATE_FUNCTION(RegisterHUD_Panels, RegisterHUD_Panel_##NAME);
  
- HUD_PANELS
+ HUD_PANELS(HUD_PANEL)
  #undef HUD_PANEL
  
  #define HUD_PANEL(NAME) hud_panel[HUD_PANEL_##NAME]
Simple merge
@@@ -385,12 -346,6 +353,14 @@@ void Draw_WaypointSprite(
        // choose the sprite
        switch(self.rule)
        {
-                       if not((autocvar_g_waypointsprite_itemstime == 1 && t == NUM_SPECTATOR + 1)
-                       || (autocvar_g_waypointsprite_itemstime == 2 && (t == NUM_SPECTATOR + 1 || warmup_stage)))
 +              case SPRITERULE_SPECTATOR:
++                      if(!(
++                              (autocvar_g_waypointsprite_itemstime == 1 && t == NUM_SPECTATOR + 1)
++                      ||      (autocvar_g_waypointsprite_itemstime == 2 && (t == NUM_SPECTATOR + 1 || warmup_stage))
++                              ))
 +                              return;
 +                      spriteimage = self.netname;
 +                      break;
                case SPRITERULE_DEFAULT:
                        if(self.team)
                        {
- // COMMIT-TODO: Update if necessary before committing
- // Revision 1: additional statistics sent (flag caps, returns, deaths)
- // Revision 2: Mapvote preview pictures
- // Revision 3: optimized map vote protocol
- // Revision 4: CSQC config var system
- // Revision 5: mapvote time fix
- // Revision 6: more robust against packet loss/delays, also show not yet connected clients
- // Revision 7: packet loss column
- // Revision 8: race
- // Revision 9: race delta
- // Revision 10: scoreboard force
- // Revision 11: scoreboard unforce; spectator support beginning
- // Revision 12: smaller scores updates (SERVER: requires new engine)
- // Revision 13: pointparticles
- // Revision 14: laser
- // Revision 15: zoom
- // Revision 16: multi-weapons
- // Revision 17: multi-weaponimpulses
- // Revision 18: warmup
- // Revision 19: fog
- // Revision 20: naggers
- // Revision 21: entcs for players optimized (position data down from 12 to 7 bytes); waypointsprites in csqc for team radar
- // Revision 22: hook shot origin
- #define CSQC_REVISION 22
- const float AS_STRING = 1;
- const float AS_INT = 2;
- const float AS_FLOAT_TRUNCATED = 2;
- const float AS_FLOAT = 8;
- const float TE_CSQC_PICTURE = 100;
- const float TE_CSQC_RACE = 101;
- const float TE_CSQC_VORTEXBEAMPARTICLE = 103;
- const float TE_CSQC_ARC = 104;
- const float TE_CSQC_TEAMNAGGER = 105;
- const float TE_CSQC_PINGPLREPORT = 106;
- const float TE_CSQC_TARGET_MUSIC = 107;
- const float TE_CSQC_WEAPONCOMPLAIN = 108;
- const float TE_CSQC_VORTEX_SCOPE = 109;
- const float TE_CSQC_MINELAYER_MAXMINES = 110;
- const float TE_CSQC_HAGAR_MAXROCKETS = 111;
- const float TE_CSQC_VEHICLESETUP = 112;
- const float TE_CSQC_SVNOTICE = 113;
- const float TE_CSQC_SHOCKWAVEPARTICLE = 114;
- const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
- const float RACE_NET_CHECKPOINT_CLEAR = 1;
- const float RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
- const float RACE_NET_CHECKPOINT_HIT_RACE = 3; // byte checkpoint, short delta, byte lapsdelta, string opponent
- const float RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT = 4; // byte checkpoint, short delta, byte lapsdelta, string opponent
- const float RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
- const float RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
- const float RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
- const float RACE_NET_SERVER_RECORD = 8; // server record, sent to client
- const float RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
- const float RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
- const float RACE_NET_SERVER_RANKINGS = 11;
- const float RACE_NET_SERVER_STATUS = 12;
- const float RANKINGS_CNT = 15;
- const float ENT_CLIENT = 0;
- const float ENT_CLIENT_DEAD = 1;
- const float ENT_CLIENT_ENTCS = 2;
- const float ENT_CLIENT_SCORES_INFO = 3;
- const float ENT_CLIENT_SCORES = 4;
- const float ENT_CLIENT_TEAMSCORES = 5;
- const float ENT_CLIENT_POINTPARTICLES = 6;
- const float ENT_CLIENT_RAINSNOW = 7;
- const float ENT_CLIENT_LASER = 8;
- const float ENT_CLIENT_NAGGER = 9; // flags [votecalledvote]
- const float ENT_CLIENT_WAYPOINT = 10; // flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable]
- const float ENT_CLIENT_RADARLINK = 11; // flags [startorigin] [endorigin] [startcolor+16*endcolor]
- const float ENT_CLIENT_PROJECTILE = 12;
- const float ENT_CLIENT_GIBSPLASH = 13;
- const float ENT_CLIENT_DAMAGEINFO = 14;
- const float ENT_CLIENT_CASING = 15;
- const float ENT_CLIENT_INIT = 16;
- const float ENT_CLIENT_MAPVOTE = 17;
- const float ENT_CLIENT_CLIENTDATA = 18;
- const float ENT_CLIENT_RANDOMSEED = 19;
- const float ENT_CLIENT_WALL = 20;
- const float ENT_CLIENT_SPIDERBOT = 21;
- const float ENT_CLIENT_MODELEFFECT = 22;
- const float ENT_CLIENT_TUBANOTE = 23;
- const float ENT_CLIENT_WARPZONE = 24;
- const float ENT_CLIENT_WARPZONE_CAMERA = 25;
- const float ENT_CLIENT_TRIGGER_MUSIC = 26;
- const float ENT_CLIENT_HOOK = 27;
- const float ENT_CLIENT_ARC_BEAM = 29; // WEAPONTODO: fix numbers
- const float ENT_CLIENT_ACCURACY = 30;
- const float ENT_CLIENT_SHOWNAMES = 31;
- const float ENT_CLIENT_WARPZONE_TELEPORTED = 32;
- const float ENT_CLIENT_MODEL = 33;
- const float ENT_CLIENT_ITEM = 34;
- const float ENT_CLIENT_BUMBLE_RAYGUN = 35;
- const float ENT_CLIENT_SPAWNPOINT = 36;
- const float ENT_CLIENT_SPAWNEVENT = 37;
- const float ENT_CLIENT_NOTIFICATION = 38;
- const float ENT_CLIENT_ELIMINATEDPLAYERS = 39;
- const float ENT_CLIENT_TURRET = 40;
- const float ENT_CLIENT_AUXILIARYXHAIR = 50;
- const float ENT_CLIENT_VEHICLE = 60;
- const float ENT_CLIENT_HEALING_ORB = 80;
- const float SPRITERULE_DEFAULT = 0;
- const float SPRITERULE_TEAMPLAY = 1;
- const float SPRITERULE_SPECTATOR = 2;
- const float RADARICON_NONE = 0;
- const float RADARICON_FLAG = 1;
- const float RADARICON_FLAGCARRIER = 1;
- const float RADARICON_HERE = 1; // TODO make these 3 and 4, and make images for them
- const float RADARICON_DANGER = 1;
- const float RADARICON_WAYPOINT = 1;
- const float RADARICON_HELPME = 1;
- const float RADARICON_CONTROLPOINT = 1;
- const float RADARICON_GENERATOR = 1;
- const float RADARICON_OBJECTIVE = 1;
- const float RADARICON_DOMPOINT = 1;
- const float RADARICON_POWERUP = 1;
- const float RADARICON_TAGGED = 1;
+ #ifndef CONSTANTS_H
+ #define CONSTANTS_H
+ const int AS_STRING = 1;
+ const int AS_INT = 2;
+ const int AS_FLOAT_TRUNCATED = 2;
+ const int AS_FLOAT = 8;
+ const int TE_CSQC_PICTURE = 100;
+ const int TE_CSQC_RACE = 101;
+ const int TE_CSQC_VORTEXBEAMPARTICLE = 103;
+ const int TE_CSQC_ARC = 104;
+ const int TE_CSQC_TEAMNAGGER = 105;
+ const int TE_CSQC_PINGPLREPORT = 106;
+ const int TE_CSQC_TARGET_MUSIC = 107;
+ const int TE_CSQC_WEAPONCOMPLAIN = 108;
+ const int TE_CSQC_VORTEX_SCOPE = 109;
+ const int TE_CSQC_MINELAYER_MAXMINES = 110;
+ const int TE_CSQC_HAGAR_MAXROCKETS = 111;
+ const int TE_CSQC_VEHICLESETUP = 112;
+ const int TE_CSQC_SVNOTICE = 113;
+ const int TE_CSQC_SHOCKWAVEPARTICLE = 114;
+ const int RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
+ const int RACE_NET_CHECKPOINT_CLEAR = 1;
+ const int RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
+ const int RACE_NET_CHECKPOINT_HIT_RACE = 3; // byte checkpoint, short delta, byte lapsdelta, string opponent
+ const int RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT = 4; // byte checkpoint, short delta, byte lapsdelta, string opponent
+ const int RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
+ const int RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
+ const int RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
+ const int RACE_NET_SERVER_RECORD = 8; // server record, sent to client
+ const int RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
+ const int RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
+ const int RACE_NET_SERVER_RANKINGS = 11;
+ const int RACE_NET_SERVER_STATUS = 12;
+ const int RANKINGS_CNT = 15;
+ const int ENT_CLIENT = 0;
+ const int ENT_CLIENT_DEAD = 1;
+ const int ENT_CLIENT_ENTCS = 2;
+ const int ENT_CLIENT_SCORES_INFO = 3;
+ const int ENT_CLIENT_SCORES = 4;
+ const int ENT_CLIENT_TEAMSCORES = 5;
+ const int ENT_CLIENT_POINTPARTICLES = 6;
+ const int ENT_CLIENT_RAINSNOW = 7;
+ const int ENT_CLIENT_LASER = 8;
+ const int ENT_CLIENT_NAGGER = 9; // flags [votecalledvote]
+ const int ENT_CLIENT_WAYPOINT = 10; // flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable]
+ const int ENT_CLIENT_RADARLINK = 11; // flags [startorigin] [endorigin] [startcolor+16*endcolor]
+ const int ENT_CLIENT_PROJECTILE = 12;
+ const int ENT_CLIENT_GIBSPLASH = 13;
+ const int ENT_CLIENT_DAMAGEINFO = 14;
+ const int ENT_CLIENT_CASING = 15;
+ const int ENT_CLIENT_INIT = 16;
+ const int ENT_CLIENT_MAPVOTE = 17;
+ const int ENT_CLIENT_CLIENTDATA = 18;
+ const int ENT_CLIENT_RANDOMSEED = 19;
+ const int ENT_CLIENT_WALL = 20;
+ const int ENT_CLIENT_SPIDERBOT = 21;
+ const int ENT_CLIENT_MODELEFFECT = 22;
+ const int ENT_CLIENT_TUBANOTE = 23;
+ const int ENT_CLIENT_WARPZONE = 24;
+ const int ENT_CLIENT_WARPZONE_CAMERA = 25;
+ const int ENT_CLIENT_TRIGGER_MUSIC = 26;
+ const int ENT_CLIENT_HOOK = 27;
+ const int ENT_CLIENT_ARC_BEAM = 29; // WEAPONTODO: fix numbers
+ const int ENT_CLIENT_ACCURACY = 30;
+ const int ENT_CLIENT_SHOWNAMES = 31;
+ const int ENT_CLIENT_WARPZONE_TELEPORTED = 32;
+ const int ENT_CLIENT_MODEL = 33;
+ const int ENT_CLIENT_ITEM = 34;
+ const int ENT_CLIENT_BUMBLE_RAYGUN = 35;
+ const int ENT_CLIENT_SPAWNPOINT = 36;
+ const int ENT_CLIENT_SPAWNEVENT = 37;
+ const int ENT_CLIENT_NOTIFICATION = 38;
+ const int ENT_CLIENT_ELIMINATEDPLAYERS = 39;
+ const int ENT_CLIENT_TURRET = 40;
+ const int ENT_CLIENT_AUXILIARYXHAIR = 50;
+ const int ENT_CLIENT_VEHICLE = 60;
+ const int ENT_CLIENT_HEALING_ORB = 80;
+ const int SPRITERULE_DEFAULT = 0;
+ const int SPRITERULE_TEAMPLAY = 1;
++const int SPRITERULE_SPECTATOR = 2;
+ const int RADARICON_NONE = 0;
+ const int RADARICON_FLAG = 1;
+ const int RADARICON_FLAGCARRIER = 1;
+ const int RADARICON_HERE = 1; // TODO make these 3 and 4, and make images for them
+ const int RADARICON_DANGER = 1;
+ const int RADARICON_WAYPOINT = 1;
+ const int RADARICON_HELPME = 1;
+ const int RADARICON_CONTROLPOINT = 1;
+ const int RADARICON_GENERATOR = 1;
+ const int RADARICON_OBJECTIVE = 1;
+ const int RADARICON_DOMPOINT = 1;
+ const int RADARICON_POWERUP = 1;
+ const int RADARICON_TAGGED = 1;
  
  ///////////////////////////
  // keys pressed
Simple merge
index 0000000,68b90d5..0e6bb85
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,132 +1,133 @@@
+ #include "anim/animation.qc"
+ #include "anim/animhost.qc"
+ #include "anim/easing.qc"
+ #include "anim/keyframe.qc"
+ #include "item.qc"
+ #include "item/borderimage.qc"
+ #include "item/button.qc"
+ #include "item/checkbox.qc"
+ #include "item/container.qc"
+ #include "item/dialog.qc"
+ #include "item/image.qc"
+ #include "item/inputbox.qc"
+ #include "item/inputcontainer.qc"
+ #include "item/label.qc"
+ #include "item/listbox.qc"
+ #include "item/modalcontroller.qc"
+ #include "item/nexposee.qc"
+ #include "item/radiobutton.qc"
+ #include "item/slider.qc"
+ #include "item/tab.qc"
+ #include "item/textslider.qc"
+ #include "xonotic/bigbutton.qc"
+ #include "xonotic/bigcommandbutton.qc"
+ #include "xonotic/button.qc"
+ #include "xonotic/campaign.qc"
+ #include "xonotic/charmap.qc"
+ #include "xonotic/checkbox.qc"
+ #include "xonotic/checkbox_slider_invalid.qc"
+ #include "xonotic/checkbox_string.qc"
+ #include "xonotic/colorbutton.qc"
+ #include "xonotic/colorpicker.qc"
+ #include "xonotic/colorpicker_string.qc"
+ #include "xonotic/commandbutton.qc"
+ #include "xonotic/credits.qc"
+ #include "xonotic/crosshairbutton.qc"
+ #include "xonotic/cvarlist.qc"
+ #include "xonotic/demolist.qc"
+ #include "xonotic/dialog.qc"
+ #include "xonotic/dialog_credits.qc"
+ #include "xonotic/dialog_firstrun.qc"
+ #include "xonotic/dialog_hudpanel_ammo.qc"
+ #include "xonotic/dialog_hudpanel_buffs.qc"
+ #include "xonotic/dialog_hudpanel_centerprint.qc"
+ #include "xonotic/dialog_hudpanel_chat.qc"
+ #include "xonotic/dialog_hudpanel_engineinfo.qc"
+ #include "xonotic/dialog_hudpanel_healtharmor.qc"
+ #include "xonotic/dialog_hudpanel_infomessages.qc"
++#include "xonotic/dialog_hudpanel_itemstime.c"
+ #include "xonotic/dialog_hudpanel_modicons.qc"
+ #include "xonotic/dialog_hudpanel_notification.qc"
+ #include "xonotic/dialog_hudpanel_physics.qc"
+ #include "xonotic/dialog_hudpanel_powerups.qc"
+ #include "xonotic/dialog_hudpanel_pressedkeys.qc"
+ #include "xonotic/dialog_hudpanel_racetimer.qc"
+ #include "xonotic/dialog_hudpanel_radar.qc"
+ #include "xonotic/dialog_hudpanel_score.qc"
+ #include "xonotic/dialog_hudpanel_timer.qc"
+ #include "xonotic/dialog_hudpanel_vote.qc"
+ #include "xonotic/dialog_hudpanel_weapons.qc"
+ #include "xonotic/dialog_hudsetup_exit.qc"
+ #include "xonotic/dialog_monstertools.qc"
+ #include "xonotic/dialog_multiplayer.qc"
+ #include "xonotic/dialog_multiplayer_create.qc"
+ #include "xonotic/dialog_multiplayer_create_mapinfo.qc"
+ #include "xonotic/dialog_multiplayer_create_mutators.qc"
+ #include "xonotic/dialog_multiplayer_join.qc"
+ #include "xonotic/dialog_multiplayer_join_serverinfo.qc"
+ #include "xonotic/dialog_multiplayer_media.qc"
+ #include "xonotic/dialog_multiplayer_media_demo.qc"
+ #include "xonotic/dialog_multiplayer_media_demo_startconfirm.qc"
+ #include "xonotic/dialog_multiplayer_media_demo_timeconfirm.qc"
+ #include "xonotic/dialog_multiplayer_media_musicplayer.qc"
+ #include "xonotic/dialog_multiplayer_media_screenshot.qc"
+ #include "xonotic/dialog_multiplayer_media_screenshot_viewer.qc"
+ #include "xonotic/dialog_multiplayer_profile.qc"
+ #include "xonotic/dialog_quit.qc"
+ #include "xonotic/dialog_sandboxtools.qc"
+ #include "xonotic/dialog_settings.qc"
+ #include "xonotic/dialog_settings_audio.qc"
+ #include "xonotic/dialog_settings_effects.qc"
+ #include "xonotic/dialog_settings_game.qc"
+ #include "xonotic/dialog_settings_game_crosshair.qc"
+ #include "xonotic/dialog_settings_game_hudconfirm.qc"
+ #include "xonotic/dialog_settings_game_hud.qc"
+ #include "xonotic/dialog_settings_game_messages.qc"
+ #include "xonotic/dialog_settings_game_model.qc"
+ #include "xonotic/dialog_settings_game_view.qc"
+ #include "xonotic/dialog_settings_game_weapons.qc"
+ #include "xonotic/dialog_settings_input.qc"
+ #include "xonotic/dialog_settings_input_userbind.qc"
+ #include "xonotic/dialog_settings_misc.qc"
+ #include "xonotic/dialog_settings_misc_cvars.qc"
+ #include "xonotic/dialog_settings_misc_reset.qc"
+ #include "xonotic/dialog_settings_user.qc"
+ #include "xonotic/dialog_settings_user_languagewarning.qc"
+ #include "xonotic/dialog_settings_video.qc"
+ #include "xonotic/dialog_singleplayer.qc"
+ #include "xonotic/dialog_singleplayer_winner.qc"
+ #include "xonotic/dialog_teamselect.qc"
+ #include "xonotic/gametypelist.qc"
+ #include "xonotic/image.qc"
+ #include "xonotic/inputbox.qc"
+ #include "xonotic/keybinder.qc"
+ #include "xonotic/languagelist.qc"
+ #include "xonotic/listbox.qc"
+ #include "xonotic/mainwindow.qc"
+ #include "xonotic/maplist.qc"
+ #include "xonotic/nexposee.qc"
+ #include "xonotic/playerlist.qc"
+ #include "xonotic/playermodel.qc"
+ #include "xonotic/playlist.qc"
+ #include "xonotic/radiobutton.qc"
+ #include "xonotic/rootdialog.qc"
+ #include "xonotic/screenshotimage.qc"
+ #include "xonotic/screenshotlist.qc"
+ #include "xonotic/serverlist.qc"
+ #include "xonotic/skinlist.qc"
+ #include "xonotic/slider.qc"
+ #include "xonotic/slider_decibels.qc"
+ #include "xonotic/slider_particles.qc"
+ #include "xonotic/slider_picmip.qc"
+ #include "xonotic/slider_resolution.qc"
+ #include "xonotic/slider_sbfadetime.qc"
+ #include "xonotic/soundlist.qc"
+ #include "xonotic/statslist.qc"
+ #include "xonotic/tabcontroller.qc"
+ #include "xonotic/tab.qc"
+ #include "xonotic/textlabel.qc"
+ #include "xonotic/textslider.qc"
+ #include "xonotic/weaponarenacheckbox.qc"
+ #include "xonotic/weaponslist.qc"
index 349be0a,0000000..a643617
mode 100644,000000..100644
--- /dev/null
@@@ -1,44 -1,0 +1,46 @@@
- #ifdef INTERFACE
- CLASS(XonoticHUDItemsTimeDialog) EXTENDS(XonoticRootDialog)
++#ifndef DIALOG_HUDPANEL_ITEMSTIME_H
++#define DIALOG_HUDPANEL_ITEMSTIME_H
++#include "rootdialog.qc"
++CLASS(XonoticHUDItemsTimeDialog, XonoticRootDialog)
 +      METHOD(XonoticHUDItemsTimeDialog, fill, void(entity))
 +      ATTRIB(XonoticHUDItemsTimeDialog, title, string, _("Items Time Panel"))
 +      ATTRIB(XonoticHUDItemsTimeDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT)
 +      ATTRIB(XonoticHUDItemsTimeDialog, intendedWidth, float, 0.4)
 +      ATTRIB(XonoticHUDItemsTimeDialog, rows, float, 15)
 +      ATTRIB(XonoticHUDItemsTimeDialog, columns, float, 4)
 +      ATTRIB(XonoticHUDItemsTimeDialog, name, string, "HUDitemstime")
 +ENDCLASS(XonoticHUDItemsTimeDialog)
 +#endif
 +
 +#ifdef IMPLEMENTATION
 +void XonoticHUDItemsTimeDialog_fill(entity me)
 +{
 +      entity e;
 +      string panelname = "itemstime";
 +
 +      me.TR(me);
 +              me.TD(me, 1, 4, e = makeXonoticTextSlider("hud_panel_itemstime"));
 +                      e.addValue(e, ZCTX(_("PNL^Disabled")), "0");
 +                      e.addValue(e, ZCTX(_("PNL^Enabled spectating")), "1");
 +                      e.addValue(e, ZCTX(_("PNL^Enabled even playing in warmup")), "2");
 +                      e.configureXonoticTextSliderValues(e);
 +
 +      DIALOG_HUDPANEL_COMMON_NOTOGGLE();
 +
 +      me.TR(me);
 +              me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Align icon:")));
 +                      me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "0", _("Left")));
 +                      me.TD(me, 1, 2.6/2, e = makeXonoticRadioButton(2, "hud_panel_itemstime_iconalign", "1", _("Right")));
 +      me.TR(me);
 +              me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar", _("Enable status bar")));
 +              me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "hud_panel_itemstime_progressbar_reduced", _("Reduced")));
 +                      setDependent(e, "hud_panel_itemstime_progressbar", 1, 1);
 +      me.TR(me);
 +              me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Text/icon ratio:")));
 +              me.TD(me, 1, 2.6, e = makeXonoticSlider(2, 8, 0.5, "hud_panel_itemstime_ratio"));
 +      me.TR(me);
 +              me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_showspawned", _("Show spawned items")));
 +      me.TR(me);
 +              me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "hud_panel_itemstime_size_dinamic", _("Dinamic size")));
 +}
 +#endif
index 0000000,76e7138..11c1f22
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,255 +1,259 @@@
+ #ifndef MAINWINDOW_H
+ #define MAINWINDOW_H
+ #include "../item/modalcontroller.qc"
+ CLASS(MainWindow, ModalController)
+       METHOD(MainWindow, configureMainWindow, void(entity))
+       METHOD(MainWindow, draw, void(entity))
+       ATTRIB(MainWindow, firstRunDialog, entity, NULL)
+       ATTRIB(MainWindow, advancedDialog, entity, NULL)
+       ATTRIB(MainWindow, mutatorsDialog, entity, NULL)
+       ATTRIB(MainWindow, mapInfoDialog, entity, NULL)
+       ATTRIB(MainWindow, userbindEditDialog, entity, NULL)
+       ATTRIB(MainWindow, winnerDialog, entity, NULL)
+       ATTRIB(MainWindow, serverInfoDialog, entity, NULL)
+       ATTRIB(MainWindow, cvarsDialog, entity, NULL)
+       ATTRIB(MainWindow, screenshotViewerDialog, entity, NULL)
+       ATTRIB(MainWindow, viewDialog, entity, NULL)
+       ATTRIB(MainWindow, hudconfirmDialog, entity, NULL)
+       ATTRIB(MainWindow, languageWarningDialog, entity, NULL)
+       ATTRIB(MainWindow, mainNexposee, entity, NULL)
+       ATTRIB(MainWindow, fadedAlpha, float, SKINALPHA_BEHIND)
+       ATTRIB(MainWindow, dialogToShow, entity, NULL)
+       ATTRIB(MainWindow, demostartconfirmDialog, entity, NULL)
+       ATTRIB(MainWindow, demotimeconfirmDialog, entity, NULL)
+       ATTRIB(MainWindow, resetDialog, entity, NULL)
+ ENDCLASS(MainWindow)
+ #endif
+ #ifdef IMPLEMENTATION
+ void MainWindow_draw(entity me)
+ {
+       SUPER(MainWindow).draw(me);
+       if(me.dialogToShow)
+       {
+               DialogOpenButton_Click_withCoords(world, me.dialogToShow, '0 0 0', eX * conwidth + eY * conheight);
+               me.dialogToShow = NULL;
+       }
+ }
+ void DemoButton_Click(entity me, entity other)
+ {
+       if(me.text == _("Do not press this button again!"))
+               DialogOpenButton_Click(me, other);
+       else
+               me.setText(me, _("Do not press this button again!"));
+ }
+ void MainWindow_configureMainWindow(entity me)
+ {
+       entity n, i;
+       // dialog run upon startup
+       me.firstRunDialog = i = NEW(XonoticFirstRunDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       // hud_configure dialogs
+       i = NEW(XonoticHUDExitDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDNotificationDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDAmmoDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDHealthArmorDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDChatDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDModIconsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDPowerupsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDPressedKeysDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDRaceTimerDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDRadarDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDScoreDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDTimerDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDVoteDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDWeaponsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDEngineInfoDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDInfoMessagesDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDPhysicsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.screenshotViewerDialog = i = NEW(XonoticScreenshotViewerDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDCenterprintDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticHUDBuffsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
++      i = NEW(XonoticHUDItemsTimeDialog);
++      i.configureDialog(i);
++      me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
++
+       // dialogs used by settings
+       me.userbindEditDialog = i = NEW(XonoticUserbindEditDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.cvarsDialog = i = NEW(XonoticCvarsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.resetDialog = i = NEW(XonoticResetDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.languageWarningDialog = i = NEW(XonoticLanguageWarningDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.hudconfirmDialog = i = NEW(XonoticHUDConfirmDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       // dialog used by singleplayer
+       me.winnerDialog = i = NEW(XonoticWinnerDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       // dialog used by multiplayer/join
+       me.serverInfoDialog = i = NEW(XonoticServerInfoDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.demostartconfirmDialog = i = NEW(XonoticDemoStartConfirmDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.demotimeconfirmDialog = i = NEW(XonoticDemoTimeConfirmDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       // dialogs used by multiplayer/create
+       me.mapInfoDialog = i = NEW(XonoticMapInfoDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       me.mutatorsDialog = i = NEW(XonoticMutatorsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       // mutator dialogs
+       i = NEW(XonoticSandboxToolsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z * SKINALPHA_DIALOG_SANDBOXTOOLS);
+       // miscellaneous dialogs
+       i = NEW(XonoticTeamSelectDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+       i = NEW(XonoticMonsterToolsDialog);
+       i.configureDialog(i);
+       me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z * SKINALPHA_DIALOG_SANDBOXTOOLS);
+       // main dialogs/windows
+       me.mainNexposee = n = NEW(XonoticNexposee);
+       /*
+               if(checkextension("DP_GECKO_SUPPORT"))
+               {
+                       i = spawnXonoticNewsDialog();
+                       i.configureDialog(i);
+                       n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+                       n.setNexposee(n, i, '0.1 0.1 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               }
+       */
+               i = NEW(XonoticSingleplayerDialog);
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               i = NEW(XonoticMultiplayerDialog);
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_MULTIPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               i = NEW(XonoticSettingsDialog);
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_SETTINGS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               i = NEW(XonoticCreditsDialog);
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_CREDITS, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
+               i = NEW(XonoticQuitDialog);
+               i.configureDialog(i);
+               n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
+               n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
+               n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
+       me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
+       me.moveItemAfter(me, n, NULL);
+       me.initializeDialog(me, n);
+       if(cvar_string("_cl_name") == cvar_defstring("_cl_name"))
+               me.dialogToShow = me.firstRunDialog;
+ }
+ #endif
+ /* Click. The c-word is here so you can grep for it :-) */
Simple merge
Simple merge
@@@ -566,18 -570,7 +571,18 @@@ const float ACTIVE_TOGGLE        = 3
  .void (float act_state) setactive;
  .entity realowner;
  
- float serverflags;
 +.float item_armor_large_time;
 +.float item_health_mega_time;
 +.float item_invisible_time;
 +.float item_speed_time;
 +.float item_extralife_time;
 +.float item_strength_time;
 +.float item_shield_time;
 +.float item_fuelregen_time;
 +.float item_jetpack_time;
 +.float item_superweapons_time;
 +
+ //float serverflags;
  
  .float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
  
@@@ -765,22 -804,9 +805,22 @@@ void spawnfunc_worldspawn (void
        addstat(STAT_VORTEX_CHARGEPOOL, AS_FLOAT, vortex_chargepool_ammo);
  
        addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load);
-       
        addstat(STAT_ARC_HEAT, AS_FLOAT, arc_heat_percent);
  
 +      // items time
 +      addstat(STAT_ARMOR_LARGE_TIME, AS_FLOAT, item_armor_large_time);
 +      addstat(STAT_HEALTH_MEGA_TIME, AS_FLOAT, item_health_mega_time);
 +      addstat(STAT_INVISIBLE_TIME, AS_FLOAT, item_invisible_time);
 +      addstat(STAT_SPEED_TIME, AS_FLOAT, item_speed_time);
 +      addstat(STAT_EXTRALIFE_TIME, AS_FLOAT, item_extralife_time);
 +      addstat(STAT_STRENGTH_TIME, AS_FLOAT, item_strength_time);
 +      addstat(STAT_SHIELD_TIME, AS_FLOAT, item_shield_time);
 +      addstat(STAT_FUELREGEN_TIME, AS_FLOAT, item_fuelregen_time);
 +      addstat(STAT_JETPACK_TIME, AS_FLOAT, item_jetpack_time);
 +      addstat(STAT_SUPERWEAPONS_TIME, AS_FLOAT, item_superweapons_time);
 +      Item_ItemsTime_Init();
 +
        // freeze attacks
        addstat(STAT_FROZEN, AS_INT, frozen);
        addstat(STAT_REVIVE_PROGRESS, AS_FLOAT, revive_progress);
@@@ -603,13 -469,9 +632,13 @@@ void Item_RespawnCountdown (void
                        }
                        if(name)
                        {
-                               WaypointSprite_Spawn(name, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE, RADARICON_POWERUP, rgb);
+                               WaypointSprite_Spawn(name, 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, true, RADARICON_POWERUP, rgb);
                                if(self.waypointsprite_attached)
 +                              {
 +                                      if (self.items == IT_HEALTH || self.items == IT_ARMOR)
 +                                              WaypointSprite_UpdateRule(self.waypointsprite_attached, 0, SPRITERULE_SPECTATOR);
                                        WaypointSprite_UpdateBuildFinished(self.waypointsprite_attached, time + ITEM_RESPAWN_TICKS);
 +                              }
                        }
                        else
                        {
@@@ -1264,11 -1085,9 +1293,11 @@@ void StartItem (string itemmodel, strin
  
                if((itemflags & (FL_POWERUP | FL_WEAPON)) || (itemid & (IT_HEALTH | IT_ARMOR | IT_KEY1 | IT_KEY2)))
                        self.target = "###item###"; // for finding the nearest item using find()
 +
 +              Item_ItemsTime_UpdateTime(self, 0);
        }
  
-       self.bot_pickup = TRUE;
+       self.bot_pickup = true;
        self.bot_pickupevalfunc = pickupevalfunc;
        self.bot_pickupbasevalue = pickupbasevalue;
        self.mdl = self.model;
@@@ -98,6 -113,6 +113,10 @@@ const float ITEM_RESPAWN_TICKS = 10
  .float max_armorvalue;
  .float pickup_anyway;
  
++void Item_ItemsTime_Get(entity e);
++
++void Item_ItemsTime_ResetForPlayer(entity e);
++
  void Item_Show (entity e, float mode);
  
  void Item_Respawn (void);
@@@ -190,23 -196,18 +196,23 @@@ float WaypointSprite_visible_for_player
        // personal waypoints
        if(self.enemy)
                if(self.enemy != e)
-                       return FALSE;
+                       return false;
  
        // team waypoints
 -      if(self.team && self.rule == SPRITERULE_DEFAULT)
 +      if(self.rule == SPRITERULE_SPECTATOR)
 +      {
 +              if(!warmup_stage && e.classname == "player")
 +                      return FALSE;
 +      }
 +      else if(self.team && self.rule == SPRITERULE_DEFAULT)
        {
                if(self.team != e.team)
-                       return FALSE;
+                       return false;
                if (!IS_PLAYER(e))
-                       return FALSE;
+                       return false;
        }
  
-       return TRUE;
+       return true;
  }
  
  entity WaypointSprite_getviewentity(entity e)