Skip to content

Commit aed58c2

Browse files
committed
Make xray alpha configurable.
1 parent cc4d909 commit aed58c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.qc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ void(float apilevel, string enginename, float engineversion) CSQC_Init =
216216
registercvar("pip_bg_quad_color", "0.2 0.2 0.5");
217217
registercvar("pip_bg_pent_color", "0.5 0.2 0.2");
218218
registercvar("pip_xray", "1");
219+
registercvar("pip_xray_alpha", "0.3");
219220
registercvar("pip_xray_distance", "512");
220221
registercvar("pip_xray_color_team", "0 1 0");
221222
registercvar("pip_xray_color_enemy", "1 0 0");
@@ -265,7 +266,7 @@ float(float isnew) PipNewPlayer =
265266

266267
self.effects |= EF_NODEPTHTEST | EF_ADDITIVE;
267268
self.drawmask = MASK_XRAY;
268-
self.alpha = 0.3 * distanceFactor;
269+
self.alpha = cvar("pip_xray_alpha") * distanceFactor;
269270
self.fatness = 2;
270271

271272
string pov_team = getplayerkeyvalue(player_localentnum-1, "team");

0 commit comments

Comments
 (0)