From: Mario Date: Mon, 28 Dec 2015 10:18:37 +0000 (+1000) Subject: Make it optional X-Git-Tag: xonotic-v0.8.2~1376 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a1a95ac3e0b1262f92bf42874d9139784399211;p=xonotic%2Fxonotic-data.pk3dir.git Make it optional --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index e47e357bf..6505d8911 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -34,9 +34,12 @@ 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)