]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/mutators/events.qh
Makefile: use `-I.`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / mutators / events.qh
index 8f317c8e8a6f042476a887fbeb1869bc2b7841a7..7141e4455e1849f4ccbd0d12aa55d095b612d4ac 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef CLIENT_MUTATORS_EVENTS_H
 #define CLIENT_MUTATORS_EVENTS_H
 
-#include "../../common/mutators/base.qh"
+#include <common/mutators/base.qh>
 
 // globals
 
@@ -29,24 +29,108 @@ 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 */
 MUTATOR_HOOKABLE(UpdateCrosshair, EV_NO_ARGS);
 
-/**
- * Called when a temp entity is parsed
- * NOTE: hooks MUST start with `if (MUTATOR_RETURNVALUE) return false;`
- * NOTE: hooks MUST start with `if (!ReadMutatorEquals(mutator_argv_int_0, name_of_mutator)) return false;`
- * NOTE: return true if you handled the command, return false to continue handling
- */
-#define EV_CSQC_Parse_TempEntity(i, o) \
-    /** entity id */ i(int, mutator_argv_int_0) \
-    /**/
-MUTATOR_HOOKABLE(CSQC_Parse_TempEntity, EV_CSQC_Parse_TempEntity);
+/** Called when a projectile is linked with CSQC */
+#define EV_Ent_Projectile(i, o) \
+       /** 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) \
+       /**/
+MUTATOR_HOOKABLE(EditProjectile, EV_EditProjectile);
+
+/* Called when projectiles are precached */
+MUTATOR_HOOKABLE(PrecacheProjectiles, EV_NO_ARGS);
+
+/** Called when updating the attached tags index */
+#define EV_TagIndex_Update(i, o) \
+       /** 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) \
+       /**/
+MUTATOR_HOOKABLE(TagIndex_Apply, EV_TagIndex_Apply);
+
+/** Called when setting up skeleton bones */
+#define EV_Skeleton_CheckBones(i, o) \
+       /** 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) \
+       /**/
+MUTATOR_HOOKABLE(Skeleton_CheckModel, EV_Skeleton_CheckModel);
+
+/** Called when clearing the global parameters for a model */
+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) \
+       /**/
+string checkmodel_input, checkmodel_command;
+MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams);
+
+/** Called checking if 3rd person mode should be forced on */
+#define EV_WantEventchase(i, o) \
+       /** 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);
+
+#define EV_HUD_Draw_overlay(i, o) \
+       /**/ o(vector, MUTATOR_ARGV_0_vector) \
+       /**/ o(float, MUTATOR_ARGV_0_float) \
+       /**/
+MUTATOR_HOOKABLE(HUD_Draw_overlay, EV_HUD_Draw_overlay);
+
+MUTATOR_HOOKABLE(HUD_Powerups_add, EV_NO_ARGS);
+
+/** Return true to not draw any vortex beam */
+#define EV_Particles_VortexBeam(i, o) \
+       /**/ i(vector, vbeam_shotorg) \
+       /**/ i(vector, vbeam_endpos) \
+       /**/
+vector vbeam_shotorg;
+vector vbeam_endpos;
+MUTATOR_HOOKABLE(Particles_VortexBeam, EV_Particles_VortexBeam);
+
+/** Return true to not draw any impact effect */
+#define EV_Weapon_ImpactEffect(i, o) \
+       /**/ i(entity, w_hitwep) \
+       /**/
+entity w_hitwep;
+MUTATOR_HOOKABLE(Weapon_ImpactEffect, EV_Weapon_ImpactEffect);
+
+/* NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false;
+*/
+#define EV_HUD_Command(i, o) \
+       /** also, argv() can be used */ i(int, cmd_argc) \
+       /**/
+MUTATOR_HOOKABLE(HUD_Command, EV_HUD_Command);
 
 #endif