]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/events.qh
Merge branch 'master' into Mario/vaporizer_damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index 3db53202275238ffeb7bb855891f17964365cc85..e867e049a398cb1b253638644c6836573094a6d4 100644 (file)
@@ -137,9 +137,11 @@ MUTATOR_HOOKABLE(SpectateCopy, EV_SpectateCopy);
     /**/ i(string, format_escape) \
     /**/ i(string, format_replacement) \
     /**/ o(string, format_replacement) \
+    /**/ i(string, format_message) \
     /**/
 string format_escape;
 string format_replacement;
+string format_message;
 MUTATOR_HOOKABLE(FormatMessage, EV_FormatMessage);
 
 /** returns 1 if throwing the current weapon shall not be allowed */
@@ -236,6 +238,13 @@ MUTATOR_HOOKABLE(MonsterSpawn, EV_NO_ARGS);
     /**/
 MUTATOR_HOOKABLE(MonsterDies, EV_MonsterDies);
 
+/** called when a monster dies */
+#define EV_MonsterRemove(i, o) \
+    /**/ i(entity, rem_mon) \
+    /**/
+entity rem_mon; // avoiding ovewriting self & other
+MUTATOR_HOOKABLE(MonsterRemove, EV_MonsterRemove);
+
 /** called when a monster wants to respawn */
 #define EV_MonsterRespawn(i, o) \
     /**/ i(entity, other) \
@@ -299,6 +308,7 @@ MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor, EV_PlayerDamage_SplitHealthArmor
  * i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).
  */
 #define EV_PlayerDamage_Calculate(i, o) \
+    /**/ i(entity, frag_inflictor) \
     /**/ i(entity, frag_attacker) \
     /**/ i(entity, frag_target) \
     /**/ i(float, frag_deathtype) \
@@ -338,21 +348,17 @@ MUTATOR_HOOKABLE(PlayerPowerups, EV_PlayerPowerups);
  * called every player think frame
  * return 1 to disable regen
  */
-#define EV_PlayerRegen(i, o) \
-    /**/ i(float, regen_mod_max) \
-    /**/ o(float, regen_mod_max) \
-    /**/ i(float, regen_mod_regen) \
-    /**/ o(float, regen_mod_regen) \
-    /**/ i(float, regen_mod_rot) \
-    /**/ o(float, regen_mod_rot) \
-    /**/ i(float, regen_mod_limit) \
-    /**/ o(float, regen_mod_limit) \
-    /**/
 float regen_mod_max;
 float regen_mod_regen;
 float regen_mod_rot;
 float regen_mod_limit;
-MUTATOR_HOOKABLE(PlayerRegen, EV_PlayerRegen);
+float regen_health;
+float regen_health_linear;
+float regen_health_rot;
+float regen_health_rotlinear;
+float regen_health_stable;
+float regen_health_rotstable;
+MUTATOR_HOOKABLE(PlayerRegen, EV_NO_ARGS);
 
 /**
  * called when the use key is pressed
@@ -394,6 +400,17 @@ int cmd_argc;
 string cmd_string;
 MUTATOR_HOOKABLE(SV_ParseClientCommand, EV_SV_ParseClientCommand);
 
+/** please read EV_SV_ParseClientCommand description before using */
+#define EV_SV_ParseServerCommand(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) \
+    /**/
+//string cmd_name;
+//int cmd_argc;
+//string cmd_string;
+MUTATOR_HOOKABLE(SV_ParseServerCommand, EV_SV_ParseServerCommand);
+
 /**
  * called when a spawnpoint is being evaluated
  * return 1 to make the spawnpoint unusable
@@ -581,6 +598,40 @@ MUTATOR_HOOKABLE(FireBullet_Hit, EV_FireBullet_Hit);
 #define EV_FixPlayermodel(i, o) \
     /**/ i(string, ret_string) \
     /**/ o(string, ret_string) \
+    /**/ i(int, ret_int) \
+    /**/ o(int, ret_int) \
     /**/
+int ret_int;
 MUTATOR_HOOKABLE(FixPlayermodel, EV_FixPlayermodel);
+
+/** Return error to play frag remaining announcements */
+MUTATOR_HOOKABLE(Scores_CountFragsRemaining, EV_NO_ARGS);
+
+#define EV_GrappleHookThink(i, o) \
+    /**/ i(entity, self) \
+    /**/ i(int, hook_tarzan) \
+    /**/ o(int, hook_tarzan) \
+    /**/ i(entity, hook_pullentity) \
+    /**/ o(entity, hook_pullentity) \
+    /**/ i(float, hook_velmultiplier) \
+    /**/ o(float, hook_velmultiplier) \
+    /**/
+int hook_tarzan;
+entity hook_pullentity;
+float hook_velmultiplier;
+MUTATOR_HOOKABLE(GrappleHookThink, EV_GrappleHookThink);
+
+#define EV_BuffModel_Customize(i, o) \
+    /**/ i(entity, self) \
+    /**/ i(entity, buff_player) \
+    /**/
+entity buff_player;
+MUTATOR_HOOKABLE(BuffModel_Customize, EV_BuffModel_Customize);
+
+/** called at when a buff is touched. Called early, can edit buff properties. */
+#define EV_BuffTouch(i, o) \
+    /** item */ i(entity, self) \
+    /** player */ i(entity, other) \
+    /**/
+MUTATOR_HOOKABLE(BuffTouch, EV_BuffTouch);
 #endif