]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mutators/events.qh
Merge branch 'master' into Mario/csqc_muzzleflash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mutators / events.qh
index b3c0b0dfbfcf484f292292f8554125c7c154b889..0629c2a9f0dd17a7897c73f6ff68dc818748c4ac 100644 (file)
@@ -2,6 +2,11 @@
 
 #include <common/mutators/base.qh>
 
+// register all possible hooks here
+
+// to use a hook, first register your mutator using REGISTER_MUTATOR
+// then create your function using MUTATOR_HOOKFUNCTION
+
 /**
  * Called when a client command is parsed
  * NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false;
@@ -165,12 +170,6 @@ MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS);
        /**/
 MUTATOR_HOOKABLE(DrawInfoMessages, EV_DrawInfoMessages);
 
-/** Called when drawing info messages, allows adding new info messages */
-#define EV_HUD_WriteCvars(i, o) \
-       /** file */                     i(float, MUTATOR_ARGV_0_float) \
-       /**/
-MUTATOR_HOOKABLE(HUD_WriteCvars, EV_HUD_WriteCvars);
-
 /** Called when the view model is being animated (setorigin is called after the hook, so you only need to modify origin here if desired) */
 #define EV_DrawViewModel(i, o) \
        /** entity id */                i(entity, MUTATOR_ARGV_0_entity) \
@@ -186,3 +185,14 @@ MUTATOR_HOOKABLE(HUD_Contents, EV_NO_ARGS);
        /** is local */                 i(bool, MUTATOR_ARGV_1_bool) \
        /**/
 MUTATOR_HOOKABLE(ForcePlayermodels_Skip, EV_ForcePlayermodels_Skip);
+
+/** Called when damage info is received on the client, useful for playing explosion effects */
+#define EV_DamageInfo(i, o) \
+       /** entity id */                i(entity, MUTATOR_ARGV_0_entity) \
+       /** death type */               i(int, MUTATOR_ARGV_1_int) \
+       /** 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);