]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/hud_cleanups
authorterencehill <piuntn@gmail.com>
Wed, 14 Oct 2015 19:38:55 +0000 (21:38 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 14 Oct 2015 19:38:55 +0000 (21:38 +0200)
1  2 
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/client/view.qc
qcsrc/common/minigames/cl_minigames_hud.qc
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc

diff --combined qcsrc/client/hud.qc
index a8ddc029433b12b28c488ee91429233b9f1cc224,90be935df3b43528717b39aa53e0eefc1404ab4e..5ead970345f2b10a4d7152c1a86c822263cd9c6f
@@@ -1,27 -1,19 +1,19 @@@
  #include "hud.qh"
- #include "_all.qh"
  
  #include "hud_config.qh"
  #include "mapvoting.qh"
  #include "scoreboard.qh"
  #include "teamradar.qh"
  #include "t_items.qh"
- #include "../dpdefs/keycodes.qh"
  #include "../common/buffs/all.qh"
- #include "../common/constants.qh"
- #include "../common/deathtypes.qh"
+ #include "../common/deathtypes/all.qh"
  #include "../common/items/all.qc"
  #include "../common/mapinfo.qh"
- #include "../common/nades/all.qh"
  #include "../common/mutators/mutator/waypoints/all.qh"
- #include "../server/mutators/gamemode_ctf.qh"
+ #include "../common/nades/all.qh"
  #include "../common/stats.qh"
- #include "../csqcmodellib/cl_player.qh"
+ #include "../lib/csqcmodel/cl_player.qh"
+ #include "../server/mutators/gamemode_ctf.qh"
  
  
  /*
@@@ -206,12 -198,6 +198,6 @@@ HUD panel
  ==================
  */
  
- // draw the background/borders
- #define HUD_Panel_DrawBg(theAlpha) do {                                                                                                                                                               \
-       if(panel.current_panel_bg != "0" && panel.current_panel_bg != "")                                                                                               \
-               draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel.current_panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));\
- } while(0)
  //basically the same code of draw_ButtonPicture and draw_VertButtonPicture for the menu
  void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
  {
@@@ -380,6 -366,7 +366,6 @@@ void HUD_Weapons(void
        vector color;
  
        // check to see if we want to continue
 -      if(intermission == 2) return;
        if(hud != HUD_NORMAL) return;
  
        if(!autocvar__hud_configure)
@@@ -965,6 -952,7 +951,6 @@@ int nade_prevframe
  float nade_statuschange_time;
  void HUD_Ammo(void)
  {
 -      if(intermission == 2) return;
        if(hud != HUD_NORMAL) return;
        if(!autocvar__hud_configure)
        {
@@@ -1239,6 -1227,8 +1225,6 @@@ int getPowerupItemAlign(int align, int 
  
  void HUD_Powerups()
  {
 -      if(intermission == 2) return;
 -
        int allItems = getstati(STAT_ITEMS, 0, 24);
        int allBuffs = getstati(STAT_BUFFS, 0, 24);
        int strengthTime, shieldTime, superTime;
  void HUD_HealthArmor(void)
  {
        int armor, health, fuel;
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_healtharmor) return;
        if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
        {
                vector v;
-               v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON);
+               v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON.m_id);
  
                float x;
                x = floor(v.x + 1);
@@@ -1708,6 -1699,7 +1694,6 @@@ void HUD_Notify_Push(string icon, strin
  
  void HUD_Notify(void)
  {
 -      if(intermission == 2) return;
        if (!autocvar__hud_configure)
                if (!autocvar_hud_panel_notify)
                        return;
  
  void HUD_Timer(void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_timer) return;
@@@ -2041,6 -2034,7 +2027,6 @@@ void HUD_Radar_Mouse(
  
  void HUD_Radar(void)
  {
 -      if(intermission == 2) return;
        if (!autocvar__hud_configure)
        {
                if (hud_panel_radar_maximized)
@@@ -2389,6 -2383,7 +2375,6 @@@ void HUD_Score_Rankings(vector pos, vec
  
  void HUD_Score(void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_score) return;
  //
  void HUD_RaceTimer (void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_racetimer) return;
  
  void HUD_Vote(void)
  {
 -      if(intermission == 2) return;
        if(autocvar_cl_allow_uid2name == -1 && (gametype == MAPINFO_TYPE_CTS || gametype == MAPINFO_TYPE_RACE || (serverflags & SERVERFLAG_PLAYERSTATS)))
        {
                vote_active = 1;
@@@ -3598,6 -3595,7 +3584,6 @@@ float mod_change; // "time" when mod_ac
  
  void HUD_ModIcons(void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_modicons) return;
  //
  void HUD_PressedKeys(void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_pressedkeys) return;
@@@ -3802,6 -3801,7 +3788,6 @@@ float frametimeavg1; // 1 frame ag
  float frametimeavg2; // 2 frames ago
  void HUD_EngineInfo(void)
  {
 -      //if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_engineinfo) return;
  } while(0)
  void HUD_InfoMessages(void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_infomessages) return;
@@@ -4044,6 -4045,7 +4030,6 @@@ float acc_prevtime, acc_avg, top_speed
  float physics_update_time, discrete_speed, discrete_acceleration;
  void HUD_Physics(void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_physics) return;
@@@ -4435,6 -4437,7 +4421,6 @@@ void reset_centerprint_messages(void
  float hud_configure_cp_generation_time;
  void HUD_CenterPrint (void)
  {
 -      if(intermission == 2) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_centerprint) return;
@@@ -4678,48 -4681,28 +4664,48 @@@ Main HUD syste
  ==================
  */
  
 +void HUD_Vehicle()
 +{
 +      if(autocvar__hud_configure) return;
 +      if(intermission == 2) return;
 +
 +      if(hud == HUD_BUMBLEBEE_GUN)
 +              CSQC_BUMBLE_GUN_HUD();
 +      else {
 +              Vehicle info = get_vehicleinfo(hud);
 +              info.vr_hud(info);
 +      }
 +}
 +
  bool HUD_Panel_CheckFlags(int showflags)
  {
        if ( HUD_Minigame_Showpanels() )
                return showflags & PANEL_SHOW_MINIGAME;
 +      if(intermission == 2)
 +              return showflags & PANEL_SHOW_MAPVOTE;
        return showflags & PANEL_SHOW_MAINGAME;
  }
  
  void HUD_Panel_Draw(entity panent)
  {
        panel = panent;
 -      if ( HUD_Panel_CheckFlags(panel.panel_showflags) )
 +      if(autocvar__hud_configure)
 +      {
 +              if(panel.panel_configflags & PANEL_CONFIG_MAIN)
 +                      panel.panel_draw();
 +      }
 +      else if(HUD_Panel_CheckFlags(panel.panel_showflags))
                panel.panel_draw();
  }
  
 -void HUD_Reset (void)
 +void HUD_Reset(void)
  {
        // reset gametype specific icons
        if(gametype == MAPINFO_TYPE_CTF)
                HUD_Mod_CTF_Reset();
  }
  
 -void HUD_Main (void)
 +void HUD_Main(void)
  {
        int i;
        // global hud theAlpha fade
        for(i = hud_panels_COUNT - 1; i >= 0; --i)
                HUD_Panel_Draw(hud_panels[panel_order[i]]);
  
 +      HUD_Vehicle();
 +
        hud_draw_maximized = 1; // panels that may be maximized must check this var
        // draw maximized panels on top
        if(hud_panel_radar_maximized)
        if(hud_panel_quickmenu)
                HUD_Panel_Draw(HUD_PANEL(QUICKMENU));
  
 +      if (scoreboard_active || intermission == 2)
 +              HUD_Reset();
 +
        HUD_Configure_PostDraw();
  
        hud_configure_prev = autocvar__hud_configure;
diff --combined qcsrc/client/hud.qh
index 5f454cc0ed9c37a11365296d9cbd153bc9c3a9ce,517fd8c07bcd521b7b86b73fe79e1dc110ecec26..ba9cb171e915a6c4ec81c830cabbc83615531b29
@@@ -1,23 -1,31 +1,32 @@@
- #ifndef HUD_H
- #define HUD_H
+ #ifndef CLIENT_HUD_H
+ #define CLIENT_HUD_H
  
  #include "../common/weapons/all.qh"
  
+ bool HUD_Radar_Clickable();
+ void HUD_Radar_Mouse();
  REGISTRY(hud_panels, 24)
  REGISTER_REGISTRY(Registerhud_panels)
  
 -#define REGISTER_HUD_PANEL(id, draw_func, name, showflags) \
 +#define REGISTER_HUD_PANEL(id, draw_func, name, configflags, showflags) \
        void draw_func(); \
        REGISTER(Registerhud_panels, HUD_PANEL, hud_panels, id, m_id, new(hud_panel)) { \
                this.panel_id = this.m_id; \
                this.panel_draw = draw_func; \
                this.panel_name = #name; \
 +              this.panel_configflags = configflags; \
                this.panel_showflags = showflags; \
        }
  
  #define HUD_PANEL(NAME) HUD_PANEL_##NAME
  
+ // draw the background/borders
+ #define HUD_Panel_DrawBg(theAlpha) do {                                                                                                                                                               \
+       if(panel.current_panel_bg != "0" && panel.current_panel_bg != "")                                                                                               \
+               draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel.current_panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));\
+ } while(0)
  int panel_order[hud_panels_MAX];
  string hud_panelorder_prev;
  
@@@ -29,6 -37,7 +38,7 @@@ bool hud_panel_radar_temp_hidden
  bool chat_panel_modified;
  bool radar_panel_modified;
  
+ float HUD_Radar_InputEvent(float bInputType, float nPrimary, float nSecondary);
  void HUD_Radar_Hide_Maximized();
  
  void HUD_Reset (void);
@@@ -147,14 -156,9 +157,14 @@@ void HUD_Panel_DrawProgressBar(vector t
  const int PANEL_SHOW_NEVER    = 0x00;
  const int PANEL_SHOW_MAINGAME = 0x01;
  const int PANEL_SHOW_MINIGAME = 0x02;
 +const int PANEL_SHOW_MAPVOTE  = 0x04;
  const int PANEL_SHOW_ALWAYS   = 0xff;
  bool HUD_Panel_CheckFlags(int showflags);
  
 +.int panel_configflags;
 +const int PANEL_CONFIG_NO    = 0x00;
 +const int PANEL_CONFIG_MAIN  = 0x01;
 +
  
  // prev_* vars contain the health/armor at the previous FRAME
  // set to -1 when player is dead or was not playing
@@@ -170,30 -174,30 +180,30 @@@ int prev_p_health, prev_p_armor
  
  void HUD_ItemsTime();
  
 -REGISTER_HUD_PANEL(WEAPONS,         HUD_Weapons,        weapons,        PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(AMMO,            HUD_Ammo,           ammo,           PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(POWERUPS,        HUD_Powerups,       powerups,       PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(HEALTHARMOR,     HUD_HealthArmor,    healtharmor,    PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(NOTIFY,          HUD_Notify,         notify,         PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(TIMER,           HUD_Timer,          timer,          PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(RADAR,           HUD_Radar,          radar,          PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(SCORE,           HUD_Score,          score,          PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(RACETIMER,       HUD_RaceTimer,      racetimer,      PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(VOTE,            HUD_Vote,           vote,           PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(MODICONS,        HUD_ModIcons,       modicons,       PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(PRESSEDKEYS,     HUD_PressedKeys,    pressedkeys,    PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(CHAT,            HUD_Chat,           chat,           PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(ENGINEINFO,      HUD_EngineInfo,     engineinfo,     PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(INFOMESSAGES,    HUD_InfoMessages,   infomessages,   PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(PHYSICS,         HUD_Physics,        physics,        PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(CENTERPRINT,     HUD_CenterPrint,    centerprint,    PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(MINIGAME_BOARD,  HUD_MinigameBoard,  minigameboard,  PANEL_SHOW_MINIGAME)
 -REGISTER_HUD_PANEL(MINIGAME_STATUS, HUD_MinigameStatus, minigamestatus, PANEL_SHOW_MINIGAME)
 -REGISTER_HUD_PANEL(MINIGAME_HELP,   HUD_MinigameHelp,   minigamehelp,   PANEL_SHOW_MINIGAME)
 -REGISTER_HUD_PANEL(MINIGAME_MENU,   HUD_MinigameMenu,   minigamemenu,   PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(MAPVOTE,         MapVote_Draw,       mapvote,        PANEL_SHOW_ALWAYS  )
 -REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      itemstime,      PANEL_SHOW_MAINGAME)
 -REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(WEAPONS,         HUD_Weapons,        weapons,        PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(AMMO,            HUD_Ammo,           ammo,           PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(POWERUPS,        HUD_Powerups,       powerups,       PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(HEALTHARMOR,     HUD_HealthArmor,    healtharmor,    PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(NOTIFY,          HUD_Notify,         notify,         PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
 +REGISTER_HUD_PANEL(TIMER,           HUD_Timer,          timer,          PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
 +REGISTER_HUD_PANEL(RADAR,           HUD_Radar,          radar,          PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(SCORE,           HUD_Score,          score,          PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS & ~PANEL_SHOW_MAPVOTE)
 +REGISTER_HUD_PANEL(RACETIMER,       HUD_RaceTimer,      racetimer,      PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(VOTE,            HUD_Vote,           vote,           PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS  )
 +REGISTER_HUD_PANEL(MODICONS,        HUD_ModIcons,       modicons,       PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(PRESSEDKEYS,     HUD_PressedKeys,    pressedkeys,    PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(CHAT,            HUD_Chat,           chat,           PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS  )
 +REGISTER_HUD_PANEL(ENGINEINFO,      HUD_EngineInfo,     engineinfo,     PANEL_CONFIG_MAIN, PANEL_SHOW_ALWAYS  )
 +REGISTER_HUD_PANEL(INFOMESSAGES,    HUD_InfoMessages,   infomessages,   PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(PHYSICS,         HUD_Physics,        physics,        PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(CENTERPRINT,     HUD_CenterPrint,    centerprint,    PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(MINIGAME_BOARD,  HUD_MinigameBoard,  minigameboard,  PANEL_CONFIG_NO  , PANEL_SHOW_MINIGAME)
 +REGISTER_HUD_PANEL(MINIGAME_STATUS, HUD_MinigameStatus, minigamestatus, PANEL_CONFIG_NO  , PANEL_SHOW_MINIGAME)
 +REGISTER_HUD_PANEL(MINIGAME_HELP,   HUD_MinigameHelp,   minigamehelp,   PANEL_CONFIG_NO  , PANEL_SHOW_MINIGAME)
 +REGISTER_HUD_PANEL(MINIGAME_MENU,   HUD_MinigameMenu,   minigamemenu,   PANEL_CONFIG_NO  , PANEL_SHOW_ALWAYS  )
 +REGISTER_HUD_PANEL(MAPVOTE,         MapVote_Draw,       mapvote,        PANEL_CONFIG_NO  , PANEL_SHOW_MAPVOTE )
 +REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      itemstime,      PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
 +REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      quickmenu,      PANEL_CONFIG_MAIN, PANEL_SHOW_MAINGAME)
  // always add new panels to the end of list
  
  // Because calling lots of functions in QC apparently cuts fps in half on many machines:
index 395739abc001d89a4d7ecc919b7d1516cc377e22,148c0ec8e057ca0c523fb1d46a61d310438a8087..48b3c821d20cf35d5f4ec0330dc4c368d99de5b0
@@@ -1,13 -1,7 +1,7 @@@
  #include "hud_config.qh"
- #include "_all.qh"
  
  #include "hud.qh"
  
- #include "../common/constants.qh"
- #include "../dpdefs/keycodes.qh"
  #define HUD_Write(s) fputs(fh, s)
  // q: quoted, n: not quoted
  #define HUD_Write_Cvar_n(cvar) HUD_Write(strcat("seta ", cvar, " ", cvar_string(cvar), "\n"))
@@@ -241,7 -235,7 +235,7 @@@ vector HUD_Panel_CheckMove(vector myPos
        int i;
        for (i = 0; i < hud_panels_COUNT; ++i) {
                panel = hud_panels[i];
 -              if(panel == HUD_PANEL(MAPVOTE)) continue;
 +              if(!(panel.panel_configflags & PANEL_CONFIG_MAIN)) continue;
                if(panel == highlightedPanel) continue;
                HUD_Panel_UpdatePosSize();
                if(!panel_enabled) continue;
@@@ -338,7 -332,7 +332,7 @@@ vector HUD_Panel_CheckResize(vector myS
        int i;
        for (i = 0; i < hud_panels_COUNT; ++i) {
                panel = hud_panels[i];
 -              if(panel == HUD_PANEL(MAPVOTE)) continue;
 +              if(!(panel.panel_configflags & PANEL_CONFIG_MAIN)) continue;
                if(panel == highlightedPanel) continue;
                HUD_Panel_UpdatePosSize();
                if(!panel_enabled) continue;
@@@ -790,7 -784,7 +784,7 @@@ float HUD_Panel_InputEvent(float bInput
                        for(i = 0; i < hud_panels_COUNT; ++i)
                        {
                                panel = hud_panels[i];
 -                              if(panel == HUD_PANEL(MAPVOTE))
 +                              if(!(panel.panel_configflags & PANEL_CONFIG_MAIN))
                                        continue;
                                if (panel == tab_panels[i] || panel == starting_panel)
                                        continue;
@@@ -939,7 -933,7 +933,7 @@@ float HUD_Panel_Check_Mouse_Pos(float a
                j += 1;
  
                panel = hud_panels[i];
 -              if(panel == HUD_PANEL(MAPVOTE)) continue;
 +              if(!(panel.panel_configflags & PANEL_CONFIG_MAIN)) continue;
                HUD_Panel_UpdatePosSize();
  
                float border = max(8, panel_bg_border); // FORCED border so a small border size doesn't mean you can't resize
@@@ -1021,7 -1015,7 +1015,7 @@@ void HUD_Panel_Highlight(float allow_mo
                j += 1;
  
                panel = hud_panels[i];
 -              if(panel == HUD_PANEL(MAPVOTE))
 +              if(!(panel.panel_configflags & PANEL_CONFIG_MAIN))
                        continue;
                HUD_Panel_UpdatePosSize();
  
diff --combined qcsrc/client/view.qc
index c1d0f4791b9964ab4ed541546fa09dfa3502d84b,4430c94e28ebe0bf44b3b82abd20393a03c029ab..0e04f70136818e7dd7bfea5d583541e2a2a22a4c
@@@ -1,4 -1,3 +1,3 @@@
- #include "_all.qh"
  
  #include "announcer.qh"
  #include "hook.qh"
@@@ -7,23 -6,28 +6,28 @@@
  #include "mapvoting.qh"
  #include "scoreboard.qh"
  #include "shownames.qh"
+ #include "quickmenu.qh"
  
  #include "mutators/events.qh"
  
  #include "../common/constants.qh"
  #include "../common/mapinfo.qh"
+ #include "../common/gamemodes/all.qh"
  #include "../common/nades/all.qh"
  #include "../common/stats.qh"
  #include "../common/triggers/target/music.qh"
  #include "../common/teams.qh"
- #include "../common/util.qh"
  
+ #include "../common/vehicles/all.qh"
  #include "../common/weapons/all.qh"
+ #include "../common/viewloc.qh"
+ #include "../common/minigames/cl_minigames.qh"
+ #include "../common/minigames/cl_minigames_hud.qh"
  
- #include "../csqcmodellib/cl_player.qh"
+ #include "../lib/csqcmodel/cl_player.qh"
  
- #include "../warpzonelib/client.qh"
- #include "../warpzonelib/common.qh"
+ #include "../lib/warpzone/client.qh"
+ #include "../lib/warpzone/common.qh"
  
  entity porto;
  vector polyline[16];
@@@ -394,6 -398,8 +398,6 @@@ float TrueAimCheck(
        return SHOTTYPE_HITWORLD;
  }
  
 -void CSQC_common_hud(void);
 -
  void PostInit(void);
  void CSQC_Demo_Camera();
  float HUD_WouldDrawScoreboard();
@@@ -455,15 -461,6 +459,15 @@@ bool WantEventchase(
        return false;
  }
  
 +void HUD_Crosshair_Vehicle()
 +{
 +      if(hud != HUD_BUMBLEBEE_GUN)
 +      {
 +              Vehicle info = get_vehicleinfo(hud);
 +              info.vr_crosshair(info);
 +      }
 +}
 +
  vector damage_blurpostprocess, content_blurpostprocess;
  
  float unaccounted_damage = 0;
@@@ -491,7 -488,7 +495,7 @@@ void UpdateDamage(
        spectatee_status_prev = spectatee_status;
  }
  
 -void UpdateHitsound()
 +void HitSound()
  {
        // varying sound pitch
  
        }
  }
  
 -void UpdateCrosshair()
 +void HUD_Crosshair()
  {SELFPARAM();
        static float rainbow_last_flicker;
      static vector rainbow_prev_color;
        entity e = self;
        float f, i, j;
        vector v;
 -      if(getstati(STAT_FROZEN))
 -              drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, ((getstatf(STAT_REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * getstatf(STAT_REVIVE_PROGRESS)) + ('0 1 1' * getstatf(STAT_REVIVE_PROGRESS) * -1)) : '0.25 0.90 1'), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
 -      else if (getstatf(STAT_HEALING_ORB)>time)
 -              drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, NADE_TYPE_HEAL.m_color, autocvar_hud_colorflash_alpha*getstatf(STAT_HEALING_ORB_ALPHA), DRAWFLAG_ADDITIVE);
 -      if(!intermission)
 -      if(getstatf(STAT_NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
 -      {
 -              DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_NADE_TIMER), '0.25 0.90 1' + ('1 0 0' * getstatf(STAT_NADE_TIMER)) - ('0 1 1' * getstatf(STAT_NADE_TIMER)), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
 -              drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
 -      }
 -      else if(getstatf(STAT_REVIVE_PROGRESS))
 -      {
 -              DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
 -              drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
 -      }
 -
 -      if(autocvar_r_letterbox == 0)
 -              if(autocvar_viewsize < 120)
 -                      CSQC_common_hud();
 -
 -      // crosshair goes VERY LAST
        if(!scoreboard_active && !camera_active && intermission != 2 &&
 -              spectatee_status != -1 && hud == HUD_NORMAL && !csqcplayer.viewloc &&
 +              spectatee_status != -1 && !csqcplayer.viewloc &&
                !HUD_MinigameMenu_IsOpened() )
        {
                if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
                        return;
  
 +              if (hud != HUD_NORMAL)
 +              {
 +                      HUD_Crosshair_Vehicle();
 +                      return;
 +              }
 +
                string wcross_style;
                float wcross_alpha, wcross_resolution;
                wcross_style = autocvar_crosshair;
        }
  }
  
 +void HUD_Draw()
 +{
 +      if(getstati(STAT_FROZEN))
 +              drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, ((getstatf(STAT_REVIVE_PROGRESS)) ? ('0.25 0.90 1' + ('1 0 0' * getstatf(STAT_REVIVE_PROGRESS)) + ('0 1 1' * getstatf(STAT_REVIVE_PROGRESS) * -1)) : '0.25 0.90 1'), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
 +      else if (getstatf(STAT_HEALING_ORB)>time)
 +              drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, NADE_TYPE_HEAL.m_color, autocvar_hud_colorflash_alpha*getstatf(STAT_HEALING_ORB_ALPHA), DRAWFLAG_ADDITIVE);
 +      if(!intermission)
 +      if(getstatf(STAT_NADE_TIMER) && autocvar_cl_nade_timer) // give nade top priority, as it's a matter of life and death
 +      {
 +              DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_NADE_TIMER), '0.25 0.90 1' + ('1 0 0' * getstatf(STAT_NADE_TIMER)) - ('0 1 1' * getstatf(STAT_NADE_TIMER)), autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
 +              drawstring_aspect(eY * 0.64 * vid_conheight, ((autocvar_cl_nade_timer == 2) ? _("Nade timer") : ""), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
 +      }
 +      else if(getstatf(STAT_REVIVE_PROGRESS))
 +      {
 +              DrawCircleClippedPic(eX * 0.5 * vid_conwidth + eY * 0.6 * vid_conheight, 0.1 * vid_conheight, "gfx/crosshair_ring.tga", getstatf(STAT_REVIVE_PROGRESS), '0.25 0.90 1', autocvar_hud_colorflash_alpha, DRAWFLAG_ADDITIVE);
 +              drawstring_aspect(eY * 0.64 * vid_conheight, _("Revival progress"), eX * vid_conwidth + eY * 0.025 * vid_conheight, '1 1 1', 1, DRAWFLAG_NORMAL);
 +      }
 +
 +      if(autocvar_r_letterbox == 0)
 +              if(autocvar_viewsize < 120)
 +              {
 +                      if(!(gametype == MAPINFO_TYPE_RACE || gametype == MAPINFO_TYPE_CTS))
 +                              Accuracy_LoadLevels();
 +
 +                      HUD_Main();
 +                      HUD_DrawScoreboard();
 +              }
 +
 +      // crosshair goes VERY LAST
 +      UpdateDamage();
 +      HUD_Crosshair();
 +      HitSound();
 +}
 +
  bool ov_enabled;
  float oldr_nearclip;
  float oldr_farclip_base;
@@@ -1836,7 -1814,9 +1840,7 @@@ void CSQC_UpdateView(float w, float h
  
        scoreboard_active = HUD_WouldDrawScoreboard();
  
 -      UpdateDamage();
 -      UpdateCrosshair();
 -      UpdateHitsound();
 +      HUD_Draw();
  
        if(NextFrameCommand)
        {
        else
                HUD_Radar_Mouse();
  
 -    if(hud && !intermission)
 -    if(hud == HUD_BUMBLEBEE_GUN)
 -      CSQC_BUMBLE_GUN_HUD();
 -    else {
 -      Vehicle info = get_vehicleinfo(hud);
 -              info.vr_hud(info);
 -      }
 -
        cl_notice_run();
  
        // let's reset the view back to normal for the end
  }
  
  
 -void CSQC_common_hud(void)
 -{
 -      if(!(gametype == MAPINFO_TYPE_RACE || gametype == MAPINFO_TYPE_CTS))
 -              Accuracy_LoadLevels();
 -
 -      HUD_Main(); // always run these functions for alpha checks
 -      HUD_DrawScoreboard();
 -
 -      // scoreboard/accuracy, map/gametype voting screen
 -      if (scoreboard_active || intermission == 2)
 -              HUD_Reset();
 -}
 -
 -
  // following vectors must be global to allow seamless switching between camera modes
  vector camera_offset, current_camera_offset, mouse_angles, current_angles, current_origin, current_position;
  void CSQC_Demo_Camera()
index 5ee9a167333b9741d0577e953665c3b74c043f5f,f1ee4f675caf8341e9521cf0ebf8380a442e4081..5cb21de80f3df78a54c0fcbdab8d60f9ebea50f7
@@@ -1,5 -1,5 +1,5 @@@
+ #include "cl_minigames_hud.qh"
  #include "minigames.qh"
- #include "../../client/mapvoting.qh"
  
  // whether the mouse is over the given panel
  bool HUD_mouse_over(entity somepanel)
@@@ -692,5 -692,5 +692,5 @@@ void HUD_Minigame_Mouse(
  
  bool HUD_Minigame_Showpanels()
  {
 -      return HUD_MinigameMenu_IsOpened() && ( autocvar__hud_configure || minigame_isactive() );
 +      return (HUD_MinigameMenu_IsOpened() && minigame_isactive());
  }
index 6c114ab46c9cc567d64ba391f0e0d9dd11ece36e,45003cb296be367db3ebdf7c597add364db397d0..2eee4dcf5af11a90ae40b077f1962c9fd3e2133b
@@@ -557,7 -557,7 +557,7 @@@ float bumblebee_pilot_frame(
                {
                        if(autocvar_g_vehicle_bumblebee_raygun)
                        {
-                               Damage(trace_ent, vehic, pilot, autocvar_g_vehicle_bumblebee_raygun_dps * sys_frametime, DEATH_GENERIC, trace_endpos, v_forward * autocvar_g_vehicle_bumblebee_raygun_fps * sys_frametime);
+                               Damage(trace_ent, vehic, pilot, autocvar_g_vehicle_bumblebee_raygun_dps * sys_frametime, DEATH_GENERIC.m_id, trace_endpos, v_forward * autocvar_g_vehicle_bumblebee_raygun_fps * sys_frametime);
                                vehic.vehicle_energy -= autocvar_g_vehicle_bumblebee_raygun_aps * sys_frametime;
                        }
                        else
@@@ -698,7 -698,7 +698,7 @@@ void bumblebee_blowup(
                                 autocvar_g_vehicle_bumblebee_blowup_edgedamage,
                                 autocvar_g_vehicle_bumblebee_blowup_radius, self, world,
                                 autocvar_g_vehicle_bumblebee_blowup_forceintensity,
-                                DEATH_VH_BUMB_DEATH, world);
+                                DEATH_VH_BUMB_DEATH.m_id, world);
  
        sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
        Send_Effect(EFFECT_EXPLOSION_BIG, (self.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
@@@ -953,36 -953,16 +953,36 @@@ void CSQC_BUMBLE_GUN_HUD(
  {
        Vehicles_drawHUD("vehicle_gunner", "vehicle_gunner_weapon1", string_null,
                                         "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 -                                       string_null, '0 0 0',
 -                                       string_null);
 +                                       string_null, '0 0 0');
  }
  
                METHOD(Bumblebee, vr_hud, void(Bumblebee thisveh))
                {
                        Vehicles_drawHUD(VEH_BUMBLEBEE.m_icon, "vehicle_bumble_weapon1", "vehicle_bumble_weapon2",
                                                         "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 -                                                       "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 -                                                       vCROSS_HEAL);
 +                                                       "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color);
 +
 +                      float hudAlpha = autocvar_hud_panel_fg_alpha;
 +                      float blinkValue = 0.55 + sin(time * 7) * 0.45;
 +                      vector tmpPos  = '0 0 0';
 +                      vector tmpSize = '1 1 1' * hud_fontsize;
 +                      tmpPos.x = vehicleHud_Pos.x + vehicleHud_Size.x * (520/768);
 +
 +                      if(!AuxiliaryXhair[1].draw2d)
 +                      {
 +                              tmpPos.y = vehicleHud_Pos.y + vehicleHud_Size.y * (96/256) - tmpSize.y;
 +                              drawstring(tmpPos, _("No right gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL);
 +                      }
 +
 +                      if(!AuxiliaryXhair[2].draw2d)
 +                      {
 +                              tmpPos.y = vehicleHud_Pos.y + vehicleHud_Size.y * (160/256);
 +                              drawstring(tmpPos, _("No left gunner!"), tmpSize, '1 1 1', hudAlpha * blinkValue, DRAWFLAG_NORMAL);
 +                      }
 +              }
 +              METHOD(Bumblebee, vr_crosshair, void(Bumblebee thisveh))
 +              {
 +                      Vehicles_drawCrosshair(vCROSS_HEAL);
                }
                METHOD(Bumblebee, vr_setup, void(Bumblebee thisveh))
                {
index 38c6844d49415a1e7ded8d85823baf13c432cbfc,8d87fd760312231a9eef74a741c74920393577f7..8c45b4aa9dc5802c500d8cad3fab15428b79d9f0
@@@ -27,7 -27,6 +27,6 @@@ REGISTER_VEHICLE(RACER, NEW(Racer))
  #include "racer_weapon.qc"
  
  #ifdef SVQC
- #include "../../effects/effects.qh"
  #include "../../triggers/trigger/impulse.qh"
  
  bool autocvar_g_vehicle_racer;
@@@ -482,7 -481,7 +481,7 @@@ void racer_blowup(
                                        autocvar_g_vehicle_racer_blowup_edgedamage,
                                        autocvar_g_vehicle_racer_blowup_radius, world, world,
                                        autocvar_g_vehicle_racer_blowup_forceintensity,
-                                       DEATH_VH_WAKI_DEATH, world);
+                                       DEATH_VH_WAKI_DEATH.m_id, world);
  
        self.nextthink  = time + autocvar_g_vehicle_racer_respawntime;
        self.think        = vehicles_spawn;
@@@ -655,11 -654,8 +654,11 @@@ void racer_draw(
                {
                        Vehicles_drawHUD(VEH_RACER.m_icon, "vehicle_racer_weapon1", "vehicle_racer_weapon2",
                                                         "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 -                                                       "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color,
 -                                                       vCROSS_GUIDE);
 +                                                       "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color);
 +              }
 +              METHOD(Racer, vr_crosshair, void(Racer thisveh))
 +              {
 +                      Vehicles_drawCrosshair(vCROSS_GUIDE);
                }
  #endif
                METHOD(Racer, vr_setup, void(Racer thisveh))
index 0cd426e518ffb9b9565bf5e70271bddd083d91e8,1c5c85b8d7a1bc3fd0865b1c4f83516b9214d432..58a189a85074bf53fb6cce14fe5b0868271eaa6d
@@@ -524,7 -524,7 +524,7 @@@ void raptor_blowup(
  {SELFPARAM();
        self.deadflag   = DEAD_DEAD;
        self.vehicle_exit(VHEF_NORMAL);
-       RadiusDamage (self, self.enemy, 250, 15, 250, world, world, 250, DEATH_VH_RAPT_DEATH, world);
+       RadiusDamage (self, self.enemy, 250, 15, 250, world, world, 250, DEATH_VH_RAPT_DEATH.m_id, world);
  
        self.alpha                = -1;
        self.movetype      = MOVETYPE_NONE;
@@@ -773,12 -773,6 +773,12 @@@ spawnfunc(vehicle_raptor
  #ifdef CSQC
  
                METHOD(Raptor, vr_hud, void(Raptor thisveh))
 +              {
 +                      Vehicles_drawHUD(VEH_RAPTOR.m_icon, "vehicle_raptor_weapon1", "vehicle_raptor_weapon2",
 +                                                       "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 +                                                       "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color);
 +              }
 +              METHOD(Raptor, vr_crosshair, void(Raptor thisveh))
                {
                        string crosshair;
  
                                default:        crosshair = vCROSS_BURST;
                        }
  
 -                      Vehicles_drawHUD(VEH_RAPTOR.m_icon, "vehicle_raptor_weapon1", "vehicle_raptor_weapon2",
 -                                                       "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 -                                                       "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color,
 -                                                       crosshair);
 +                      vector tmpSize = '0 0 0';
 +                      if(weapon2mode != RSM_FLARE)
 +                      {
 +                              vector where;
 +
 +                              if(!dropmark)
 +                              {
 +                                      dropmark = spawn();
 +                                      dropmark.owner = self;
 +                                      dropmark.gravity = 1;
 +                              }
 +
 +                              float reload2 = getstati(STAT_VEHICLESTAT_RELOAD2) * 0.01;
 +                              if(reload2 == 1)
 +                              {
 +                                      setorigin(dropmark, pmove_org);
 +                                      dropmark.velocity = pmove_vel;
 +                                      tracetoss(dropmark, self);
 +
 +                                      where = project_3d_to_2d(trace_endpos);
 +
 +                                      setorigin(dropmark, trace_endpos);
 +                                      tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size;
 +
 +                                      if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
 +                                      {
 +                                              where.x -= tmpSize.x * 0.5;
 +                                              where.y -= tmpSize.y * 0.5;
 +                                              where.z = 0;
 +                                              drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE);
 +                                              drawpic(where, vCROSS_DROP, tmpSize, '0 1 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg
 +                                      }
 +                                      dropmark.cnt = time + 5;
 +                              }
 +                              else
 +                              {
 +                                      if(dropmark.cnt > time)
 +                                      {
 +                                              where = project_3d_to_2d(dropmark.origin);
 +                                              tmpSize = draw_getimagesize(vCROSS_DROP) * autocvar_cl_vehicles_crosshair_size * 1.25;
 +
 +                                              if (!(where.z < 0 || where.x < 0 || where.y < 0 || where.x > vid_conwidth || where.y > vid_conheight))
 +                                              {
 +                                                      where.x -= tmpSize.x * 0.5;
 +                                                      where.y -= tmpSize.y * 0.5;
 +                                                      where.z = 0;
 +                                                      drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.9, DRAWFLAG_ADDITIVE);
 +                                                      drawpic(where, vCROSS_DROP, tmpSize, '1 0 0', autocvar_crosshair_alpha * 0.6, DRAWFLAG_NORMAL); // Ensure visibility against bright bg
 +                                              }
 +                                      }
 +                              }
 +                      }
 +
 +                      Vehicles_drawCrosshair(crosshair);
                }
                METHOD(Raptor, vr_setup, void(Raptor thisveh))
                {
index 7971cfb7937559f28cc3ebba8c5b63655846494e,cf1be2432c92e339b12c914d75bc62131a834ea9..019f5889e0590210d61ced4d128d941a6dade569
@@@ -291,7 -291,7 +291,7 @@@ float spiderbot_frame(
                        v += v_forward * 50;
  
                        fireBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_solidpenetration,
-                                 autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0);
+                                 autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN.m_id, 0);
  
                        sound (gun, CH_WEAPON_A, SND_UZI_FIRE, VOL_BASE, ATTEN_NORM);
                        //trailparticles(self, _particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
@@@ -483,7 -483,7 +483,7 @@@ void spiderbot_blowup(
        SUB_SetFade(g1, time, min(self.respawntime, 10));
        SUB_SetFade(g2, time, min(self.respawntime, 10));
  
-       RadiusDamage (self, self.enemy, 250, 15, 250, world, world, 250, DEATH_VH_SPID_DEATH, world);
+       RadiusDamage (self, self.enemy, 250, 15, 250, world, world, 250, DEATH_VH_SPID_DEATH.m_id, world);
  
        self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = -1;
        self.movetype = MOVETYPE_NONE;
@@@ -645,12 -645,6 +645,12 @@@ float autocvar_cl_vehicle_spiderbot_cro
  float autocvar_cl_vehicle_spiderbot_cross_size = 1;
  
                METHOD(Spiderbot, vr_hud, void(Spiderbot thisveh))
 +              {
 +                      Vehicles_drawHUD(VEH_SPIDERBOT.m_icon, "vehicle_spider_weapon1", "vehicle_spider_weapon2",
 +                                                       "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 +                                                       "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color);
 +              }
 +              METHOD(Spiderbot, vr_crosshair, void(Spiderbot thisveh))
                {
                        string crosshair;
  
                                default:             crosshair = vCROSS_BURST;
                        }
  
 -                      Vehicles_drawHUD(VEH_SPIDERBOT.m_icon, "vehicle_spider_weapon1", "vehicle_spider_weapon2",
 -                                                       "vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
 -                                                       "vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color,
 -                                                       crosshair);
 +                      Vehicles_drawCrosshair(crosshair);
                }
                METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh))
                {