]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/events.qh
Fix #2201 "ForbidWeaponUse mutator hook can leave the player holding a weapon they...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index ff8928c98ee3499b93bec94be03c5f4fecf660e9..f0237b27ee8b8d55d588fe6386d49deb803d7090 100644 (file)
@@ -1083,15 +1083,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) */