From: MirceaKitsune Date: Sun, 5 Sep 2010 11:48:10 +0000 (+0300) Subject: We may have only one weapon, but we can be left unarmed, and should see on the HUD... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f2149969d373a5579c421f71e3a03d7083fd88d6;p=voretournament%2Fvoretournament.git We may have only one weapon, but we can be left unarmed, and should see on the HUD when we are. So, let's show the active weapon there. First step: Getting the weapon name in the right place --- diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 303b9978..03e5c04c 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -3049,6 +3049,12 @@ void Sbar_Draw (void) Sbar_DrawXNum(pos - '144 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); } + // weapon icon + entity e; + e = get_weaponinfo(activeweapon); + //if (e && e.netname != "") + dprint(strcat("XX_", e.netname, "_YY\n")); + // draw scores and timer Sbar_Score(); Sbar_Timer(); diff --git a/data/qcsrc/common/items.qc b/data/qcsrc/common/items.qc index be851a6a..9c4d4db7 100644 --- a/data/qcsrc/common/items.qc +++ b/data/qcsrc/common/items.qc @@ -32,7 +32,7 @@ void register_weapons_done() dummy_weapon_info.classname = "weapon_info"; dummy_weapon_info.weapon = 0; // you can recognize dummies by this dummy_weapon_info.weapons = 0; // you can recognize dummies by this too - dummy_weapon_info.netname = "@!#%'n Tuba"; + dummy_weapon_info.netname = "N/A"; dummy_weapon_info.items = 0; dummy_weapon_info.weapon_func = w_null; dummy_weapon_info.mdl = "";