From: terencehill Date: Tue, 24 May 2011 22:04:20 +0000 (+0200) Subject: hud_panel_weapons_onlyowned: if player doesn't have any weapon completely hide the... X-Git-Tag: xonotic-v0.6.0~40^2~118^2~18^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=27cc6105adce4ef04600f1dbd7d6c5de1d6c9e45;p=xonotic%2Fxonotic-data.pk3dir.git hud_panel_weapons_onlyowned: if player doesn't have any weapon completely hide the weapons panel --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index bdb3d4aac..51043b5f5 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -654,6 +654,8 @@ void HUD_Weapons(void) if(weapons_st & weaponorder[i].weapons) ++weapon_count; } + if (weapon_count == 0) + return; // reduce size of the panel if (panel_size_y > panel_size_x) {