]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/events.qh
Merge branch 'master' into terencehill/lms_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index cd09b1defd7ff9051dd5d96e041fd9c303561d0d..c4521e824f3a7a9d57ce58df35494fcf3dbb8fa2 100644 (file)
@@ -90,6 +90,17 @@ MUTATOR_HOOKABLE(PlayerDies, EV_PlayerDies);
     /**/
 MUTATOR_HOOKABLE(PlayerDied, EV_PlayerDied);
 
+/** called when showing an obituary for the player. return true to show nothing (workarounds may be needed) */
+#define EV_ClientObituary(i, o) \
+    /** inflictor       */ i(entity, MUTATOR_ARGV_0_entity) \
+    /** attacker        */ i(entity, MUTATOR_ARGV_1_entity) \
+    /** target          */ i(entity, MUTATOR_ARGV_2_entity) \
+    /** deathtype       */ i(float,  MUTATOR_ARGV_3_float) \
+    /** wep entity      */ i(entity, MUTATOR_ARGV_4_entity) \
+    /** anonymous killer*/ o(bool,   MUTATOR_ARGV_5_bool) \
+    /**/
+MUTATOR_HOOKABLE(ClientObituary, EV_ClientObituary);
+
 /** allows overriding the frag centerprint messages */
 #define EV_FragCenterMessage(i, o) \
     /** attacker       */ i(entity, MUTATOR_ARGV_0_entity) \
@@ -306,6 +317,7 @@ MUTATOR_HOOKABLE(PlayerPreThink, EV_PlayerPreThink);
 MUTATOR_HOOKABLE(GetPressedKeys, EV_GetPressedKeys);
 
 /** is meant to call GetCvars_handle*(get_cvars_s, get_cvars_f, cvarfield, "cvarname") for cvars this mutator needs from the client */
+// NOTE: requesting cvar values (get_cvars_f 0) is deprecated
 #define EV_GetCvars(i, o) \
     /**/ i(float, get_cvars_f) \
     /**/ i(string, get_cvars_s) \
@@ -437,6 +449,7 @@ MUTATOR_HOOKABLE(Damage_Calculate, EV_Damage_Calculate);
 
 /**
  * Called when a player is damaged
+ * Returns true if damage shouldn't be logged
  */
 #define EV_PlayerDamaged(i, o) \
     /** attacker  */ i(entity, MUTATOR_ARGV_0_entity) \
@@ -1230,3 +1243,10 @@ MUTATOR_HOOKABLE(GetPlayerLimit, EV_GetPlayerLimit);
     /**/                  o(string, MUTATOR_ARGV_1_string) \
     /**/
 MUTATOR_HOOKABLE(LogDeath_AppendItemCodes, EV_LogDeath_AppendItemCodes);
+
+/** Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting */
+#define EV_AllowRocketJumping(i, o) \
+    /** allow_rocketjump */         i(bool, MUTATOR_ARGV_0_bool) \
+    /**/                            o(bool, MUTATOR_ARGV_0_bool) \
+    /**/
+MUTATOR_HOOKABLE(AllowRocketJumping, EV_AllowRocketJumping);