]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a hook to allow mutators to disable the zoom reticle
authorMario <mario@smbclan.net>
Mon, 20 May 2019 08:25:07 +0000 (18:25 +1000)
committerMario <mario@smbclan.net>
Mon, 20 May 2019 08:25:07 +0000 (18:25 +1000)
qcsrc/client/mutators/events.qh
qcsrc/client/view.qc

index cc6fced9b820a2885cf932118997f0bcfe44588b..e9778b795ce2e077cb7cef10023712b616743f74 100644 (file)
@@ -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);
index be4b8f4a9674071b287b0e535b0b157b3a609120..322abb87e005a628660c3abd916a8746b452ab9a 100644 (file)
@@ -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;