]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
hud_panel_weapons_onlyowned: if player doesn't have any weapon completely hide the...
authorterencehill <piuntn@gmail.com>
Tue, 24 May 2011 22:04:20 +0000 (00:04 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 24 May 2011 22:04:20 +0000 (00:04 +0200)
qcsrc/client/hud.qc

index bdb3d4aac36fea67aa6d485d5f8a8081012e15d9..51043b5f5763395bdce11acd381e2d1ef9ac26a6 100644 (file)
@@ -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)
                {