]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'refs/remotes/origin/terencehill/newpanelhud'
authorRudolf Polzer <divverent@alientrap.org>
Fri, 10 Sep 2010 21:29:28 +0000 (23:29 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 10 Sep 2010 21:29:28 +0000 (23:29 +0200)
1  2 
defaultXonotic.cfg
qcsrc/client/hud.qc

diff --combined defaultXonotic.cfg
index b0d1f654e0c0e02e45d586843b6f343f000eeca3,07e3b49d931b61bbb9050bfc1f47857175bb760e..dbe3077fbb481709a44c9cfd31aeee967de6a757
@@@ -79,8 -79,9 +79,8 @@@ alias movetoteam_pink "sv_cmd movetotea
  alias movetoteam_yellow "sv_cmd movetoteam $1 yellow"
  alias movetoteam_auto "sv_cmd movetoteam $1 auto"
  
 -// merge lightmaps up to 1024x1024 textures
 -// the default of 2048x2048 is too heavy for my rig (SavageX)
 -mod_q3bsp_lightmapmergepower 3
 +// merge lightmaps up to 2048x2048 textures
 +mod_q3bsp_lightmapmergepower 4
  
  // player defaults
  _cl_color 102
@@@ -282,6 -283,8 +282,6 @@@ seta cl_voice_directional_taunt_attenua
  hostname "Xonotic $g_xonoticversion Server"
  set sv_mapchange_delay 5
  set minplayers 0 "number of players playing at the same time (if not enough real players are there the remaining slots are filled with bots)"
 -sv_cullentities_trace 1
 -r_cullentities_trace 1
  
  // restart server if all players hit "ready"-button
  set sv_ready_restart 0 "if set to 1 allow a map to be restarted once all players pressed the \"ready\" button'"
@@@ -319,12 -322,11 +319,12 @@@ set g_allow_oldnexbeam 0 "If enabled, c
  seta cl_particles_oldnexbeam 0 "Uses the old v2.3 Nexgun beam instead of the new beam, only works if server allows it (g_allow_oldnexbeam 1)"
  set sv_qcweaponanimation 0
  
 -set g_telefrags 1
 -set g_telefrags_avoid 0
 +set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
 +set g_telefrags_teamplay 1 "never telefrag team mates"
 +set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
  set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
  
 -set g_respawn_ghosts 0 "if 1 dead bodies become ghosts and float away when the player respawns"
 +set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
  set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
  set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
  
@@@ -336,7 -338,7 +336,7 @@@ set sv_fragmessage_information_typefra
  
  // use default physics
  set sv_friction_on_land 0
 -exec physicsNoQWBunny-nexbased.cfg
 +exec physicsNoQWBunny-xpmbased.cfg
  
  set sv_player_viewoffset "0 0 35" "view offset of the player model"
  set sv_player_mins "-16 -16 -24" "playermodel mins"
@@@ -858,16 -860,16 +858,16 @@@ r_mipsprites 
  r_mipskins 1
  r_shadow_realtime_world_lightmaps 1
  seta r_ambient 4
 -cl_decals_fadetime 1
 +cl_decals_fadetime 5
  cl_decals_time 2
  seta cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center or right, 4 = center or left"
  seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
  seta cl_particlegibs 0 "simpler gibs"
  seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
 -seta cl_gibs_lifetime 14 "average lifetime of gibs"
 +seta cl_gibs_lifetime 5 "average lifetime of gibs"
  seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
  seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
 -seta cl_gibs_velocity_up 0 "extra z velocity for gibs"
 +seta cl_gibs_velocity_up 1 "extra z velocity for gibs"
  seta cl_gibs_ticrate 0.1 "ticrate for gibs"
  seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
  seta cl_casings 1 "enable or disable bullet casings"
@@@ -1327,7 -1329,7 +1327,7 @@@ con_notifyalign 
  
  // hud variables
  set _hud_configure 0 "1 = configure the HUD"
 -seta hud_configure_teamcolorforced 1 "1 = force display of team colors in configure mode"
 +seta hud_configure_teamcolorforced 0 "1 = force display of team colors in configure mode"
  seta hud_configure_checkcollisions 1 "check for collisions against other panels when in hud configure mode"
  seta hud_configure_bg_minalpha 0.25 "minimum panel background alpha when in hud configure mode"
  seta hud_configure_grid_alpha 0.15 "alpha for visible grid when in configure mode"
@@@ -1336,7 -1338,7 +1336,7 @@@ seta sbar_info_pos 0 "Y-axis distance f
  
  // hud cvar descriptions
  exec _hud_descriptions.cfg
- // exec the default skin config. remember, NO menu_restart in the deafault cfg (dp segfaults at startup otherwise)
+ // exec the default skin config
  // please add any new cvars into the hud_save script in qcsrc/client/hud.qc for consistency
  exec hud_default.cfg
  
@@@ -1374,6 -1376,9 +1374,9 @@@ seta hud_panel_engineinfo_framecounter_
  seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight 0.1 "weight of latest data point"
  seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_change_threshold 0.5 "threshold for fps change when to update instantly, to make big fps changes update faster"
  
+ seta hud_showbinds 1  "the way to show the keys to press in HUD messages: 0 displays commands, 1 bound keys, 2 both"
+ seta hud_showbinds_limit 2    "maximum number of bound keys to show for a command. 0 for unlimited"
  // scoreboard
  seta scoreboard_columns default
  seta scoreboard_border_thickness 1 "scoreboard border thickness"
@@@ -1469,7 -1474,6 +1472,7 @@@ sys_ticrate 0.016666
  cl_netfps 60 // should match
  sv_gameplayfix_delayprojectiles 0
  sv_gameplayfix_q2airaccelerate 1
 +sv_gameplayfix_stepmultipletimes 1
  
  // delay for "kill" to prevent abuse
  set g_balance_kill_delay 5
@@@ -1919,14 -1923,3 +1922,14 @@@ scr_conscroll_y -0.
  
  // DP cannot properly detect this, so rather turn off the detection
  r_texture_dds_load_dxt1_noalpha 1
 +
 +// particles optimization
 +r_drawparticles_nearclip_min 8
 +r_drawparticles_nearclip_max 16
 +
 +// sv_cullentities_trace is 1, so the client doesn't have to
 +sv_cullentities_trace 1
 +r_cullentities_trace 0
 +
 +// less "lagging" of other players, but also less PL tolerant... let's try this
 +sv_clmovement_inputtimeout 0.05
diff --combined qcsrc/client/hud.qc
index e46e5cda4e107d58900153b405ac2003cc5b35e4,91dc1658be6fc3e64c9577ce913e8489bfe54c1e..db423eb8718a10686b9962c78c0ce285d004438f
@@@ -517,7 -517,7 +517,7 @@@ void HUD_Panel_ExportCfg(string cfgname
                        }
                        fputs(fh, "\n");
                }
-               fputs(fh, strcat("menu_restart", "\n")); // force a menu update when execing config, so that the dialogs are updated
+               fputs(fh, strcat("menu_sync", "\n")); // force the menu to reread the cvars, so that the dialogs are updated
  
                print("^2Successfully exported to hud_", autocvar_hud_skin, "_", cfgname, ".cfg! (Note: It's saved in data/data/)\n");
        }
@@@ -1095,17 -1095,29 +1095,29 @@@ float HUD_Panel_InputEvent(float bInput
                        if (bInputType == 1)
                                return true;
  
-                       if (highlightedPanel_copied != -1 && highlightedPanel_prev != -1)
-                       {
-                               // backup first!
-                               panel_pos_backup = panel_pos;
-                               panel_size_backup = panel_size;
-                               highlightedPanel_backup = highlightedPanel_prev;
+                       if (highlightedPanel_copied == -1 || highlightedPanel_prev == -1)
+                               return true;
  
-                               string s;
-                               s = strcat(ftos(panel_size_copied_x/vid_conwidth), " ", ftos(panel_size_copied_y/vid_conheight));
-                               cvar_set(strcat("hud_panel_", panel_name, "_size"), s);
-                       }
+                       HUD_Panel_UpdatePosSizeForId(highlightedPanel_prev)
+                       // reduce size if it'd go beyond screen boundaries
+                       vector tmp_size = panel_size_copied;
+                       if (panel_pos_x + panel_size_copied_x > vid_conwidth)
+                               tmp_size_x = vid_conwidth - panel_pos_x;
+                       if (panel_pos_y + panel_size_copied_y > vid_conheight)
+                               tmp_size_y = vid_conheight - panel_pos_y;
+                       if (panel_size == tmp_size)
+                               return true;
+                       // backup first!
+                       panel_pos_backup = panel_pos;
+                       panel_size_backup = panel_size;
+                       highlightedPanel_backup = highlightedPanel_prev;
+                       string s;
+                       s = strcat(ftos(tmp_size_x/vid_conwidth), " ", ftos(tmp_size_y/vid_conheight));
+                       cvar_set(strcat("hud_panel_", panel_name, "_size"), s);
                }
                else if(nPrimary == 'z') // undo last action
                {
@@@ -1306,7 -1318,7 +1318,7 @@@ void HUD_Panel_Highlight(
  }
  
  float highlightcheck;
float would_backup;
vector prev_pos, prev_size;
  void HUD_Panel_Mouse()
  {
        // TODO: needs better check... is there any float that contains the current state of the menu? _menu_alpha isn't apparently updated the frame the menu gets enabled
  
        if(mouseClicked)
        {
-               vector prev_pos, prev_size;
                if(prevMouseClicked == 0)
                {
                        HUD_Panel_Highlight(); // sets highlightedPanel, highlightedAction, panel_click_distance, panel_click_resizeorigin
                                                                        // and calls HUD_Panel_UpdatePosSizeForId() for the highlighted panel
-                       would_backup = TRUE;
-               }
-               else if (would_backup)
-               {
-                       // this is not the actual backup! Saving pos and size values
-                       // only to check later if they are different from new values
                        prev_pos = panel_pos;
                        prev_size = panel_size;
                }
+               else
+                       HUD_Panel_UpdatePosSizeForId(highlightedPanel)
  
-               hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && autocvar_hud_configure_checkcollisions);
+               if (prev_pos != panel_pos || prev_size != panel_size)
+               {
+                       hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && autocvar_hud_configure_checkcollisions);
+                       // backup!
+                       panel_pos_backup = prev_pos;
+                       panel_size_backup = prev_size;
+                       highlightedPanel_backup = highlightedPanel;
+               }
+               else
+                       // in case the clicked panel is inside another panel and we aren't
+                       // moving it, avoid the immediate "fix" of its position/size
+                       // (often unwanted and hateful) by disabling collisions check
+                       hud_configure_checkcollisions = false;
  
                if(highlightedAction == 1)
                        HUD_Panel_SetPos(mousepos - panel_click_distance);
                        HUD_Panel_SetPosSize(mySize);
                }
  
-               HUD_Panel_UpdatePosSizeForId(highlightedPanel)
-               if (prevMouseClicked)
-               if (would_backup)
-               if (prev_pos != panel_pos || prev_size != panel_size)
-               {
-                       // backup!
-                       panel_pos_backup = prev_pos;
-                       panel_size_backup = prev_size;
-                       highlightedPanel_backup = highlightedPanel;
-                       would_backup = FALSE;
-               }
                // doubleclick check
                if(time - prevMouseClickedTime < 0.4 && prevMouseClicked == 0 && prevMouseClickedPos == mousepos && highlightedPanel >= 0)
                {
@@@ -2577,7 -2584,7 +2584,7 @@@ void HUD_KillNotify_Push(string attacke
        killnotify_victims[0] = strzone(victim);
  }
  
 -void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
 +void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s1 = attacker, s2 = victim
  {
        float w;
        float alsoprint, gentle;
                }
                else if(type == KILL_FIRST_BLOOD)
                        print("^1",s1, "^1 drew first blood", "\n");
 -              // TODO: icon!
                else if (type == DEATH_TELEFRAG) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_TELEFRAG);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_TELEFRAG);
                        if(gentle)
 -                              print ("^1",s1, "^1 tried to occupy ", s2, "^1's teleport destination space\n");
 +                              print ("^1",s2, "^1 tried to occupy ", s1, "^1's teleport destination space\n");
                        else
 -                              print ("^1",s1, "^1 was telefragged by ", s2, "\n");
 +                              print ("^1",s2, "^1 was telefragged by ", s1, "\n");
                }
                else if (type == DEATH_DROWN) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_DROWN);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_DROWN);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was drowned by ", s2, "\n");
 +                              print ("^1",s2, "^1 was drowned by ", s1, "\n");
                }
                else if (type == DEATH_SLIME) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_SLIME);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_SLIME);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was slimed by ", s2, "\n");
 +                              print ("^1",s2, "^1 was slimed by ", s1, "\n");
                }
                else if (type == DEATH_LAVA) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_LAVA);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_LAVA);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was cooked by ", s2, "\n");
 +                              print ("^1",s2, "^1 was cooked by ", s1, "\n");
                }
                else if (type == DEATH_FALL) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_FALL);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_FALL);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was grounded by ", s2, "\n");
 +                              print ("^1",s2, "^1 was grounded by ", s1, "\n");
                }
                else if (type == DEATH_SHOOTING_STAR) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_SHOOTING_STAR);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_SHOOTING_STAR);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was shot into space by ", s2, "\n");
 +                              print ("^1",s2, "^1 was shot into space by ", s1, "\n");
                }
                else if (type == DEATH_SWAMP) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was conserved by ", s2, "\n");
 +                              print ("^1",s2, "^1 was conserved by ", s1, "\n");
                }
                else if (type == DEATH_HURTTRIGGER)
                {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_HURTTRIGGER);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_HURTTRIGGER);
                        if(alsoprint)
 -                              print("^1",s1, "^1 was thrown into a world of hurt by ", s2, "\n");
 +                              print("^1",s2, "^1 was thrown into a world of hurt by ", s1, "\n");
                } else if(type == DEATH_SBCRUSH) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was crushed by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 was crushed by ^1", s1, "\n");
                } else if(type == DEATH_SBMINIGUN) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 got shredded by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 got shredded by ^1", s1, "\n");
                } else if(type == DEATH_SBROCKET) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was blased to bits by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 was blased to bits by ^1", s1, "\n");
                } else if(type == DEATH_SBBLOWUP) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 got caught in the destruction of ^1", s2, "'s vehicle\n");
 +                              print ("^1",s2, "^1 got caught in the destruction of ^1", s1, "'s vehicle\n");
                } else if(type == DEATH_WAKIGUN) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was bolted down by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 was bolted down by ^1", s1, "\n");
                } else if(type == DEATH_WAKIROCKET) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 could find no shelter from ^1", s2, "'s rockets\n");
 +                              print ("^1",s2, "^1 could find no shelter from ^1", s1, "'s rockets\n");
                } else if(type == DEATH_WAKIBLOWUP) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 dies when ^1", s2, "'s wakizashi dies.\n");
 +                              print ("^1",s2, "^1 dies when ^1", s1, "'s wakizashi dies.\n");
                } else if(type == DEATH_TURRET) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was pushed into the line of fire by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 was pushed into the line of fire by ^1", s1, "\n");
                } else if(type == DEATH_TOUCHEXPLODE) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was pushed into an accident by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 was pushed into an accident by ^1", s1, "\n");
                } else if(type == DEATH_CHEAT) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was unfairly eliminated by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 was unfairly eliminated by ^1", s1, "\n");
                } else if (type == DEATH_FIRE) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was burnt to death by ^1", s2, "\n");
 +                              print ("^1",s2, "^1 was burnt to death by ^1", s1, "\n");
                } else if (type == DEATH_CUSTOM) {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_CUSTOM);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_CUSTOM);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 ", s2, "\n");
 +                              print ("^1",s2, "^1 ", s1, "\n");
                } else {
 -                      HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
 +                      HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
                        if(alsoprint)
 -                              print ("^1",s1, "^1 was fragged by ", s2, "\n");
 +                              print ("^1",s2, "^1 was fragged by ", s1, "\n");
                }
        } else if(msg == MSG_SPREE) {
                if(type == KILL_END_SPREE) {
@@@ -3741,15 -3749,19 +3748,15 @@@ void HUD_VoteWindow(void
        pos = panel_pos;
        mySize = panel_size;
  
 -      panel_fg_alpha = autocvar_hud_panel_fg_alpha;
 -      panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
 +      if(!autocvar__hud_configure)
 +      {
 +              panel_fg_alpha = autocvar_hud_panel_fg_alpha;
 +              panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
  
 -      if(panel_bg_alpha_str == "") {
 -              panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
 -      }
 -      panel_bg_alpha = stof(panel_bg_alpha_str);
 -      if(autocvar__hud_configure && disable_menu_alphacheck == 2 && highlightedPanel == active_panel) {
 -              panel_bg_alpha = (1 - autocvar__menu_alpha) * max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;
 -      } else if(autocvar__hud_configure) {
 -              panel_bg_alpha = max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha);
 -      } if(autocvar__hud_configure && !panel_enabled) {
 -              panel_bg_alpha = 0.25;
 +              if(panel_bg_alpha_str == "") {
 +                      panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
 +              }
 +              panel_bg_alpha = stof(panel_bg_alpha_str);
        }
  
        string s;
        if(!vote_alpha)
                return;
  
 -      a = vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
 -
 +      a = panel_bg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
        HUD_Panel_DrawBg(a);
 +      a = panel_fg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
        if(panel_bg_padding)
        {
                pos += '1 1 0' * panel_bg_padding;
        drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize_y, s, eX * mySize_x + eY * (1.75/8) * mySize_y, a, DRAWFLAG_NORMAL);
  
        // print the yes/no counts
-       s = strcat("Yes (", getcommandkey("not bound", "vyes"), "): ", ftos(vote_yescount));
+       s = strcat("Yes (", getcommandkey("vyes", "vyes"), "): ", ftos(vote_yescount));
        drawstring_aspect(pos + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '0 1 0', a, DRAWFLAG_NORMAL);
-       s = strcat("No (", getcommandkey("not bound", "vno"), "): ", ftos(vote_nocount));
+       s = strcat("No (", getcommandkey("vno", "vno"), "): ", ftos(vote_nocount));
        drawstring_aspect(pos + eX * 0.5 * mySize_x + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '1 0 0', a, DRAWFLAG_NORMAL);
  
        // draw the progress bar backgrounds
@@@ -4552,6 -4564,11 +4559,11 @@@ void HUD_EngineInfo(void
  
  // Info messages panel (#14)
  //
+ #define drawInfoMessage(s)\
+       if(autocvar_hud_panel_infomessages_flip)\
+               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize);\
+       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);\
+       o_y += fontsize_y;
  void HUD_InfoMessages(void)
  {
        if(!autocvar_hud_panel_infomessages && !autocvar__hud_configure)
                                s = "^1Observing";
                        else
                                s = strcat("^1Spectating: ^7", GetPlayerName(spectatee_status - 1));
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                       drawInfoMessage(s)
  
                        if(spectatee_status == -1)
-                               s = strcat("^1Press ^3", getcommandkey("primary fire", "+attack"), "^1 to spectate");
+                               s = strcat("^1Press ^3", getcommandkey("primary fire", "+fire"), "^1 to spectate");
                        else
-                               s = strcat("^1Press ^3", getcommandkey("primary fire", "+attack"), "^1 for another player");
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                               s = strcat("^1Press ^3", getcommandkey("primary fire", "+fire"), "^1 for another player");
+                       drawInfoMessage(s)
  
                        if(spectatee_status == -1)
                                s = strcat("^1Use ^3", getcommandkey("next weapon", "weapnext"), "^1 or ^3", getcommandkey("previous weapon", "weapprev"), "^1 to change the speed");
                        else
-                               s = strcat("^1Press ^3", getcommandkey("secondary fire", "+attack2"), "^1 to observe");
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                               s = strcat("^1Press ^3", getcommandkey("secondary fire", "+fire2"), "^1 to observe");
+                       drawInfoMessage(s)
  
                        s = strcat("^1Press ^3", getcommandkey("server info", "+show_info"), "^1 for gamemode info");
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                       drawInfoMessage(s)
  
                        if(gametype == GAME_ARENA)
                                s = "^1Wait for your turn to join";
                        }
                        else
                                s = strcat("^1Press ^3", getcommandkey("jump", "+jump"), "^1 to join");
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                       drawInfoMessage(s)
  
                        //show restart countdown:
                        if (time < getstatf(STAT_GAMESTARTTIME)) {
                                countdown = ceil(getstatf(STAT_GAMESTARTTIME) - time);
                                s = strcat("^1Game starts in ^3", ftos(countdown), "^1 seconds");
                                drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                               o += eY * fontsize_y;
+                               o_y += fontsize_y;
                        }
                }
                if(warmup_stage && !intermission)
                {
                        s = "^2Currently in ^1warmup^2 stage!";
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                       drawInfoMessage(s)
                }
  
                string blinkcolor;
                                else
                                        s = strcat("^2Waiting for others to ready up...");
                        }
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                       drawInfoMessage(s)
                }
                else if(warmup_stage && !intermission && !spectatee_status)
                {
                        s = strcat("^2Press ^3", getcommandkey("ready", "ready"), "^2 to end warmup");
-                       if(autocvar_hud_panel_infomessages_flip)
-                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                       o += eY * fontsize_y;
+                       drawInfoMessage(s)
                }
  
                if(teamplay && !intermission && !spectatee_status && gametype != GAME_CA && teamnagger)
                                        if (tm.team != COLOR_SPECTATOR)
                                        if (tm.team_size == ts_max)
                                                s = strcat(s, " Press ^3", getcommandkey("team menu", "menu_showteamselect"), blinkcolor, " to adjust");
-                                       if(autocvar_hud_panel_infomessages_flip)
-                                               o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-                                       drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-                                       o += eY * fontsize_y;
+                                       drawInfoMessage(s)
                                }
                        }
                }
        else 
        {
                s = "^7Press ^3ESC ^7to show HUD options.";
-               if(autocvar_hud_panel_infomessages_flip)
-                       o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-               drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-               o += eY * fontsize_y;
+               drawInfoMessage(s)
                s = "^3Doubleclick ^7a panel for panel-specific options.";
-               if(autocvar_hud_panel_infomessages_flip)
-                       o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-               drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-               o += eY * fontsize_y;
+               drawInfoMessage(s)
                s = "^3CTRL ^7to disable collision testing, ^3SHIFT ^7and";
-               if(autocvar_hud_panel_infomessages_flip)
-                       o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-               drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-               o += eY * fontsize_y;
+               drawInfoMessage(s)
                s = "^3ALT ^7+ ^3ARROW KEYS ^7for fine adjustments.";
-               if(autocvar_hud_panel_infomessages_flip)
-                       o_x = pos_x + mySize_x - stringwidth(s, TRUE, fontsize); 
-               drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);
-               o += eY * fontsize_y;
+               drawInfoMessage(s)
        }
  }