From 42573473e1c79e571eb9b75a79aa8b961f216696 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 20 May 2019 18:25:07 +1000 Subject: [PATCH] Add a hook to allow mutators to disable the zoom reticle --- qcsrc/client/mutators/events.qh | 3 +++ qcsrc/client/view.qc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index cc6fced9b..e9778b795 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -199,3 +199,6 @@ MUTATOR_HOOKABLE(ForcePlayermodels_Skip, EV_ForcePlayermodels_Skip); /** hit origin */ i(vector, MUTATOR_ARGV_2_vector) \ /**/ MUTATOR_HOOKABLE(DamageInfo, EV_DamageInfo); + +/** Return true to not draw zoom reticle */ +MUTATOR_HOOKABLE(DrawReticle, EV_NO_ARGS); diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index be4b8f4a9..322abb87e 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -2188,7 +2188,7 @@ void CSQC_UpdateView(entity this, float w, float h) R_EndPolygon(); } - if(autocvar_cl_reticle) + if(autocvar_cl_reticle && !MUTATOR_CALLHOOK(DrawReticle)) { string reticle_image = string_null; bool wep_zoomed = false; -- 2.39.2