From dc883f73996838c82ad7c2cf043e37cfaf2e81d7 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 11 Feb 2018 00:56:14 +1000 Subject: [PATCH] Use a different crosshair setting in side-scrolling mode --- crosshairs.cfg | 3 +++ qcsrc/client/autocvars.qh | 1 + qcsrc/client/view.qc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/crosshairs.cfg b/crosshairs.cfg index fb341c5b8..8e7bc9b4f 100644 --- a/crosshairs.cfg +++ b/crosshairs.cfg @@ -45,6 +45,9 @@ seta crosshair_color_special_rainbow_brightness 20 "color brightness of the rand // per-weapon crosshairs seta crosshair_per_weapon 1 "when 1, each gun will display a different crosshair" +// side-scrolling crosshair +seta crosshair_2d 54 "selects crosshair to use in side-scrolling mode (\"\" uses regular crosshair and 0 is none)" + // ========================= // Crosshair ring settings diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 6d3fb6267..b6b33c3b1 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -103,6 +103,7 @@ float autocvar_con_chatsize; float autocvar_con_notify; float autocvar_con_notifysize; string autocvar_crosshair; +string autocvar_crosshair_2d = "54"; float autocvar_crosshair_alpha; string autocvar_crosshair_color; int autocvar_crosshair_color_special; diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 6a294d5ad..28b10da9e 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -997,6 +997,8 @@ void HUD_Crosshair(entity this) string wcross_style; float wcross_alpha, wcross_resolution; wcross_style = autocvar_crosshair; + if (csqcplayer.viewloc && (csqcplayer.viewloc.spawnflags & VIEWLOC_FREEAIM) && autocvar_crosshair_2d != "") + wcross_style = autocvar_crosshair_2d; if (wcross_style == "0") return; wcross_resolution = autocvar_crosshair_size; -- 2.39.2