]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/events.qh
Add some more hooks and fix a particle effect call
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index 71542d543646272a29184fefad9194f175e475f3..ad493f4f68fd180e4eb63fe29c1574ef5d447ae8 100644 (file)
@@ -182,6 +182,20 @@ MUTATOR_HOOKABLE(FilterItem, EV_NO_ARGS);
     /**/
 MUTATOR_HOOKABLE(TurretSpawn, EV_TurretSpawn);
 
+/** return error to not attack */
+#define EV_TurretFire(i, o) \
+    /** turret */ i(entity, self) \
+    /**/
+MUTATOR_HOOKABLE(TurretFire, EV_TurretFire);
+
+/** return error to not attack */
+#define EV_Turret_CheckFire(i, o) \
+    /**/ i(bool, ret_bool) \
+    /**/ o(bool, ret_bool) \
+    /**/
+bool ret_bool;
+MUTATOR_HOOKABLE(Turret_CheckFire, EV_Turret_CheckFire);
+
 /** return error to prevent entity spawn, or modify the entity */
 MUTATOR_HOOKABLE(OnEntityPreSpawn, EV_NO_ARGS);
 
@@ -536,4 +550,31 @@ enum {
        MUT_ACCADD_INVALID, // return this flag to make the function always continue
        MUT_ACCADD_INDIFFERENT // return this flag to make the function always return
 };
+
+/** 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 when a bullet has hit a target */
+#define EV_FireBullet_Hit(i, o) \
+    /**/ i(entity, self) \
+    /**/ i(entity, bullet_hit) \
+    /**/ i(vector, bullet_startpos) \
+    /**/ i(vector, bullet_endpos) \
+    /**/ i(float, frag_damage) \
+    /**/ o(float, frag_damage) \
+    /**/
+entity bullet_hit;
+//vector bullet_hitloc; // the end pos matches the hit location, apparently
+vector bullet_startpos;
+vector bullet_endpos;
+//float frag_damage;
+MUTATOR_HOOKABLE(FireBullet_Hit, EV_FireBullet_Hit);
 #endif