/**/
MUTATOR_HOOKABLE(PlayerSpawn, EV_PlayerSpawn);
+/** called after a player's weapon is chosen so it can be overriden here */
+#define EV_PlayerWeaponSelect(i, o) \
+ /** player spawning */ i(entity, MUTATOR_ARGV_0_entity) \
+ /**/
+MUTATOR_HOOKABLE(PlayerWeaponSelect, EV_PlayerWeaponSelect);
+
/** called in reset_map */
#define EV_reset_map_global(i, o) \
/**/
/**/
MUTATOR_HOOKABLE(ItemModel, EV_ItemModel);
+/** called when an item sound is about to be played, allows custom paths etc. */
+#define EV_ItemSound(i, o) \
+ /** sound */ i(string, MUTATOR_ARGV_0_string) \
+ /** output */ i(string, MUTATOR_ARGV_1_string) \
+ /**/ o(string, MUTATOR_ARGV_1_string) \
+ /**/
+MUTATOR_HOOKABLE(ItemSound, EV_ItemSound);
+
/** called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill */
#define EV_GiveFragsForKill(i, o) \
/** attacker */ i(entity, MUTATOR_ARGV_0_entity) \
/**/
MUTATOR_HOOKABLE(FormatMessage, EV_FormatMessage);
+/** called before any formatting is applied, handy for tweaking the message before scripts get ahold of it */
+#define EV_PreFormatMessage(i, o) \
+ /** player */ i(entity, MUTATOR_ARGV_0_entity) \
+ /** message */ i(string, MUTATOR_ARGV_1_string) \
+ /**/ o(string, MUTATOR_ARGV_1_string) \
+ /**/
+MUTATOR_HOOKABLE(PreFormatMessage, EV_PreFormatMessage);
+
/** returns true if throwing the current weapon shall not be allowed */
#define EV_ForbidThrowCurrentWeapon(i, o) \
/** player */ i(entity, MUTATOR_ARGV_0_entity) \
/** keepvelocity? */ i(bool, MUTATOR_ARGV_2_bool) \
/**/
MUTATOR_HOOKABLE(CopyBody, EV_CopyBody);
+
+/** called when sending a chat message, ret argument can be changed to prevent the message */
+#define EV_ChatMessage(i, o) \
+ /** sender */ i(entity, MUTATOR_ARGV_0_entity) \
+ /** ret */ i(int, MUTATOR_ARGV_1_int) \
+ /**/ o(int, MUTATOR_ARGV_1_int) \
+ /**/
+MUTATOR_HOOKABLE(ChatMessage, EV_ChatMessage);
+
+/** return true to prevent sending a chat (private, team or regular) message from reaching a certain player */
+#define EV_ChatMessageTo(i, o) \
+ /** destination player */ i(entity, MUTATOR_ARGV_0_entity) \
+ /** sender */ i(entity, MUTATOR_ARGV_1_entity) \
+ /**/
+MUTATOR_HOOKABLE(ChatMessageTo, EV_ChatMessageTo);
+
+/** return true to just restart the match, for modes that don't support readyrestart */
+MUTATOR_HOOKABLE(ReadyRestart_Deny, EV_NO_ARGS);