]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mutators/events.qh
Add some more useful hooks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mutators / events.qh
index a79e0b4712eef8ade9c5573967e5833a61629128..2fbeaaa7c15299b35ecf853ac4bfb137c8e0fd58 100644 (file)
@@ -29,10 +29,10 @@ string cmd_string;
  * }
  */
 #define EV_CSQC_ConsoleCommand(i, o) \
-    /** command name */ i(string, cmd_name) \
-    /** also, argv() can be used */ i(int, cmd_argc) \
-    /** whole command, use only if you really have to */ i(string, cmd_string) \
-    /**/
+       /** command name */ i(string, cmd_name) \
+       /** also, argv() can be used */ i(int, cmd_argc) \
+       /** whole command, use only if you really have to */ i(string, cmd_string) \
+       /**/
 MUTATOR_HOOKABLE(CSQC_ConsoleCommand, EV_CSQC_ConsoleCommand);
 
 /* Called when the crosshair is being updated */
@@ -46,8 +46,8 @@ MUTATOR_HOOKABLE(UpdateCrosshair, EV_NO_ARGS);
  *     return = true;
  */
 #define EV_CSQC_Parse_TempEntity(i, o) \
-    /** mutator id */ i(int, mutator_argv_int_0) \
-    /**/
+       /** mutator id */ i(int, mutator_argv_int_0) \
+       /**/
 MUTATOR_HOOKABLE(CSQC_Parse_TempEntity, EV_CSQC_Parse_TempEntity);
 
 /**
@@ -57,21 +57,21 @@ MUTATOR_HOOKABLE(CSQC_Parse_TempEntity, EV_CSQC_Parse_TempEntity);
  *     return = true;
  */
 #define EV_CSQC_Ent_Update(i, o) \
-    /** mutator id */ i(int, mutator_argv_int_0) \
-    /** bIsNewEntity */ i(bool, mutator_argv_bool_0) \
-    /**/
+       /** mutator id */ i(int, mutator_argv_int_0) \
+       /** bIsNewEntity */ i(bool, mutator_argv_bool_0) \
+       /**/
 MUTATOR_HOOKABLE(CSQC_Ent_Update, EV_CSQC_Ent_Update);
 
 /** Called when a projectile is linked with CSQC */
 #define EV_Ent_Projectile(i, o) \
-    /** entity id */ i(entity, __self) \
-    /**/
+       /** entity id */ i(entity, __self) \
+       /**/
 MUTATOR_HOOKABLE(Ent_Projectile, EV_Ent_Projectile);
 
 /** Called when a projectile's properties are being modified */
 #define EV_EditProjectile(i, o) \
-    /** entity id */ i(entity, __self) \
-    /**/
+       /** entity id */ i(entity, __self) \
+       /**/
 MUTATOR_HOOKABLE(EditProjectile, EV_EditProjectile);
 
 /* Called when projectiles are precached */
@@ -79,26 +79,26 @@ MUTATOR_HOOKABLE(PrecacheProjectiles, EV_NO_ARGS);
 
 /** Called when updating the attached tags index */
 #define EV_TagIndex_Update(i, o) \
-    /** entity id */ i(entity, __self) \
-    /**/
+       /** entity id */ i(entity, __self) \
+       /**/
 MUTATOR_HOOKABLE(TagIndex_Update, EV_TagIndex_Update);
 
 /** Called when setting the attached tags */
 #define EV_TagIndex_Apply(i, o) \
-    /** entity id */ i(entity, __self) \
-    /**/
+       /** entity id */ i(entity, __self) \
+       /**/
 MUTATOR_HOOKABLE(TagIndex_Apply, EV_TagIndex_Apply);
 
 /** Called when setting up skeleton bones */
 #define EV_Skeleton_CheckBones(i, o) \
-    /** entity id */ i(entity, __self) \
-    /**/
+       /** entity id */ i(entity, __self) \
+       /**/
 MUTATOR_HOOKABLE(Skeleton_CheckBones, EV_Skeleton_CheckBones);
 
 /** Called when setting up bones from the loaded model */
 #define EV_Skeleton_CheckModel(i, o) \
-    /** entity id */ i(entity, __self) \
-    /**/
+       /** entity id */ i(entity, __self) \
+       /**/
 MUTATOR_HOOKABLE(Skeleton_CheckModel, EV_Skeleton_CheckModel);
 
 /** Called when clearing the global parameters for a model */
@@ -106,27 +106,34 @@ MUTATOR_HOOKABLE(ClearModelParams, EV_NO_ARGS);
 
 /** Called when getting the global parameters for a model */
 #define EV_GetModelParams(i, o) \
-    /** entity id */ i(string, checkmodel_input) \
-    /** entity id */ i(string, checkmodel_command) \
-    /**/
+       /** entity id */ i(string, checkmodel_input) \
+       /** entity id */ i(string, checkmodel_command) \
+       /**/
 string checkmodel_input, checkmodel_command;
 MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams);
 
 /** called when a player presses the jump key */
 #define EV_PlayerJump(i, o) \
-    /**/ i(float, player_multijump) \
-    /**/ i(float, player_jumpheight) \
-    /**/ o(float, player_multijump) \
-    /**/ o(float, player_jumpheight) \
-    /**/
+       /**/ i(float, player_multijump) \
+       /**/ i(float, player_jumpheight) \
+       /**/ o(float, player_multijump) \
+       /**/ o(float, player_jumpheight) \
+       /**/
 float player_multijump;
 float player_jumpheight;
 MUTATOR_HOOKABLE(PlayerJump, EV_PlayerJump);
 
 /** Called checking if 3rd person mode should be forced on */
 #define EV_WantEventchase(i, o) \
-    /** entity id */ i(entity, __self) \
-    /**/
+       /** entity id */ i(entity, __self) \
+       /**/
 MUTATOR_HOOKABLE(WantEventchase, EV_WantEventchase);
 
+#define EV_AnnouncerOption(i, o) \
+       /**/ i(string, ret_string) \
+       /**/ o(string, ret_string) \
+       /**/
+MUTATOR_HOOKABLE(AnnouncerOption, EV_AnnouncerOption);
+
+MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS);
 #endif