From: Mario Date: Mon, 20 May 2019 08:25:07 +0000 (+1000) Subject: Add a hook to allow mutators to disable the zoom reticle X-Git-Tag: xonotic-v0.8.5~1494 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=42573473e1c79e571eb9b75a79aa8b961f216696;p=xonotic%2Fxonotic-data.pk3dir.git Add a hook to allow mutators to disable the zoom reticle --- 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;