]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/events.qh
tuba: fix #1621
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / events.qh
index bb845b8015785cd4bf7c679c83f9a1ff8a969003..5cb5b4745a5705657053ca6c6ce940072e0c68d6 100644 (file)
@@ -48,4 +48,56 @@ MUTATOR_HOOKABLE(BuildMutatorsPrettyString, EV_BuildMutatorsPrettyString);
     /**/
 MUTATOR_HOOKABLE(BuildGameplayTipsString, EV_BuildGameplayTipsString);
 
+#define EV_IsFlying(i, o) \
+       /**/ i(entity, MUTATOR_ARGV_0_entity) \
+       /**/
+MUTATOR_HOOKABLE(IsFlying, EV_IsFlying);
+
+#define EV_WP_Format(i, o) \
+    /**/ i(entity, MUTATOR_ARGV_0_entity) \
+    /**/ i(string, MUTATOR_ARGV_0_string) \
+    /**/ o(vector, MUTATOR_ARGV_0_vector) \
+    /**/ o(string, MUTATOR_ARGV_0_string) \
+    /**/
+MUTATOR_HOOKABLE(WP_Format, EV_WP_Format);
+
+/**
+ * called before any player physics, may adjust variables for movement,
+ * is run AFTER bot code and idle checking on the server
+ */
+#define EV_PlayerPhysics(i, o) \
+    /**/ i(entity, __self) \
+    /**/
+MUTATOR_HOOKABLE(PlayerPhysics, EV_PlayerPhysics);
+
+/** called when a player presses the jump key */
+#define EV_PlayerJump(i, o) \
+    /**/ i(entity, __self) \
+    /**/ i(float, player_multijump) \
+    /**/ i(float, player_jumpheight) \
+    /**/ o(float, player_multijump) \
+    /**/ o(float, player_jumpheight) \
+    /**/
+float player_multijump;
+float player_jumpheight;
+MUTATOR_HOOKABLE(PlayerJump, EV_PlayerJump);
+
+/** called during player physics, allows adjusting the movement type used */
+#define EV_PM_Physics(i, o) \
+    /**/ i(entity, __self) \
+    /**/ i(float, pm_maxspeed_mod) \
+    /**/
+float pm_maxspeed_mod;
+MUTATOR_HOOKABLE(PM_Physics, EV_PM_Physics);
+
+/** called when a weapon model is about to be set, allows custom paths etc. */
+#define EV_WeaponModel(i, o) \
+    /**/ i(string, weapon_model) \
+    /**/ i(string, weapon_model_output) \
+    /**/ o(string, weapon_model_output) \
+    /**/
+string weapon_model;
+string weapon_model_output;
+MUTATOR_HOOKABLE(WeaponModel, EV_WeaponModel);
+
 #endif