]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/events.qh
Add a mutator hook for CopyBody
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index 29b1b7abd4094c7e3e2b269717008e12e2c7936b..1c0985723000b0a5580f54a090df46f0b2c17e85 100644 (file)
@@ -854,3 +854,11 @@ MUTATOR_HOOKABLE(URI_GetCallback, EV_URI_GetCallback);
     /** player */ i(entity, MUTATOR_ARGV_0_entity) \
     /**/
 MUTATOR_HOOKABLE(ForbidWeaponUse, EV_ForbidWeaponUse);
+
+/** called when a player spawns as player, after shared setup, before his weapon is chosen (so items may be changed in here) */
+#define EV_CopyBody(i, o) \
+    /** player */               i(entity, MUTATOR_ARGV_0_entity) \
+    /** newly created clone */  i(entity, MUTATOR_ARGV_1_entity) \
+    /** keepvelocity? */        i(bool, MUTATOR_ARGV_2_bool) \
+    /**/
+MUTATOR_HOOKABLE(CopyBody, EV_CopyBody);