]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make it optional
authorMario <mario@smbclan.net>
Mon, 28 Dec 2015 10:18:37 +0000 (20:18 +1000)
committerMario <mario@smbclan.net>
Mon, 28 Dec 2015 10:18:37 +0000 (20:18 +1000)
qcsrc/common/t_items.qc

index e47e357bf33a1f0767e3ab81a65b4ed106e93beb..6505d8911444756dd866c9d45e7a57d711a79a21 100644 (file)
 REGISTER_NET_LINKED(ENT_CLIENT_ITEM)
 
 #ifdef CSQC
+bool autocvar_cl_ghost_items_vehicle = true;
 void Item_SetAlpha(entity this)
 {
-       if(!hud && (this.ItemStatus & ITS_AVAILABLE))
+       bool veh_hud = (hud && autocvar_cl_ghost_items_vehicle);
+
+       if(!veh_hud && (this.ItemStatus & ITS_AVAILABLE))
        {
                this.alpha = 1;
                this.colormod = this.glowmod = '1 1 1';
@@ -52,13 +55,14 @@ void Item_SetAlpha(entity this)
                        this.alpha = -1;
        }
 
-       if(!hud)
+       if(!veh_hud)
        if(this.ItemStatus & ITS_STAYWEP)
        {
                this.colormod = this.glowmod = autocvar_cl_weapon_stay_color;
                this.alpha = autocvar_cl_weapon_stay_alpha;
        }
 }
+
 void ItemDraw(entity this)
 {
     if(this.gravity)