From: FruitieX Date: Fri, 2 Jul 2010 17:26:00 +0000 (+0300) Subject: (new cvar) show bind on weapon instead of number X-Git-Tag: xonotic-v0.1.0preview~457^2~29 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=44fe71f1babc6d645bccd5f2ab0c23b0d44df554;p=xonotic%2Fxonotic-data.pk3dir.git (new cvar) show bind on weapon instead of number --- diff --git a/hud_wickedhud_default.cfg b/hud_wickedhud_default.cfg index f75510141..2eb38baa7 100644 --- a/hud_wickedhud_default.cfg +++ b/hud_wickedhud_default.cfg @@ -23,7 +23,7 @@ seta hud_progressbar_nexball_color "0.7 0.1 0" "R G B vector of the progress bar seta hud_weaponicons 1 "enable/disable this panel" seta hud_weaponicons_pos "0.930000 0.090000" "position of this panel" seta hud_weaponicons_size "0.040000 0.490000" "size of this panel" -seta hud_weaponicons_number 1 "show number of weapon" +seta hud_weaponicons_number 1 "1 = show number of weapon, 2 = show bound key of weapon" seta hud_weaponicons_accuracy_yellow 40 "percentage at which the accuracy color is yellow" seta hud_weaponicons_complainbubble 1 "complain bubble (out of ammo, weapon not available etc)" seta hud_weaponicons_complainbubble_size 1 "size multiplier of the complain bubble" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 11aad21fb..8d1446772 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -48,6 +48,7 @@ var string autocvar_hud_weaponicons_bg_alpha; var string autocvar_hud_weaponicons_bg_border; var string autocvar_hud_weaponicons_bg_padding; var float autocvar_hud_weaponicons_accuracy_yellow; +var float autocvar_hud_weaponicons_number; var float autocvar_hud_weaponicons_complainbubble; var float autocvar_hud_weaponicons_complainbubble_size; var float autocvar_hud_weaponicons_complainbubble_time; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 4ec5852d4..bc3ef552e 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1452,9 +1452,12 @@ void HUD_WeaponIcons(void) { drawpic_aspect_skin(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), strcat("weapon", self.netname), eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows), '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL); - if(cvar_or("hud_weaponicons_number", 1)) + if(autocvar_hud_weaponicons_number == 1) // weapon number drawstring(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), ftos(weapid), '1 1 0' * 0.5 * mySize_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + else if(autocvar_hud_weaponicons_number == 2) // bind + drawstring(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * mySize_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); } + // draw a "ghost weapon icon" if you don't have the weapon else {