]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/events.qh
Merge branch 'master' into Mario/stats_eloranking
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index ff8928c98ee3499b93bec94be03c5f4fecf660e9..1ca629078e4a99d27076c5292e1aade918bf5996 100644 (file)
@@ -306,6 +306,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) \
@@ -1083,15 +1084,23 @@ MUTATOR_HOOKABLE(Player_ChangeTeamKill, EV_Player_ChangeTeamKill);
        /** id */       i(float, MUTATOR_ARGV_0_float) \
        /** status */   i(float, MUTATOR_ARGV_1_float) \
        /** data */     i(string, MUTATOR_ARGV_2_string) \
-    /**/
+       /**/
 MUTATOR_HOOKABLE(URI_GetCallback, EV_URI_GetCallback);
 
+/**
+ * return true to lock weapon (can't be used nor changed) for a player
+ */
+#define EV_LockWeapon(i, o) \
+       /** player */ i(entity, MUTATOR_ARGV_0_entity) \
+       /**/
+MUTATOR_HOOKABLE(LockWeapon, EV_LockWeapon);
+
 /**
  * return true to prevent weapon use for a player
  */
- #define EV_ForbidWeaponUse(i, o) \
-    /** player */ i(entity, MUTATOR_ARGV_0_entity) \
-    /**/
+#define EV_ForbidWeaponUse(i, o) \
+       /** player */ i(entity, MUTATOR_ARGV_0_entity) \
+       /**/
 MUTATOR_HOOKABLE(ForbidWeaponUse, EV_ForbidWeaponUse);
 
 /** called when creating a clone of the player (usually for corpses that stay after the player has re-spawned) */
@@ -1214,3 +1223,11 @@ MUTATOR_HOOKABLE(Unfreeze, EV_Unfreeze);
     /**/                            o(int, MUTATOR_ARGV_0_int) \
     /**/
 MUTATOR_HOOKABLE(GetPlayerLimit, EV_GetPlayerLimit);
+
+/** include special item codes for a death to the game log */
+#define EV_LogDeath_AppendItemCodes(i, o) \
+    /** player */         i(entity, MUTATOR_ARGV_0_entity) \
+    /** item codes */     i(string, MUTATOR_ARGV_1_string) \
+    /**/                  o(string, MUTATOR_ARGV_1_string) \
+    /**/
+MUTATOR_HOOKABLE(LogDeath_AppendItemCodes, EV_LogDeath_AppendItemCodes);