overkill: take into account last weapon held when switching while dead
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index 09e1cf70bd212497b69907be4ec13c31e97d33ca..36b1118345a23d6c7c2ae4ddcd28755c1a61f612 100644 (file)
@@ -31,6 +31,12 @@ MUTATOR_HOOKABLE(ForbidSpawn, EV_ForbidSpawn);
     /**/
 MUTATOR_HOOKABLE(PlayerSpawn, EV_PlayerSpawn);
 
+/** called after a player's weapon is chosen so it can be overriden here */
+#define EV_PlayerWeaponSelect(i, o) \
+       /** player spawning */ i(entity, MUTATOR_ARGV_0_entity) \
+    /**/
+MUTATOR_HOOKABLE(PlayerWeaponSelect, EV_PlayerWeaponSelect);
+
 /** called in reset_map */
 #define EV_reset_map_global(i, o) \
     /**/