X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmutators%2Fevents.qh;h=5edb84ae0ee7fc42245871e32c1752d02939493b;hb=f41f81f37e3ecf5a2d14f7bc7ffd7bbf09fff32e;hp=0fa65d28ef75d2270450ea2028feda07a3d19c06;hpb=90da6817bc443ee9402472527e746af2c254926e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index 0fa65d28e..5edb84ae0 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -2,6 +2,11 @@ #include +// register all possible hooks here + +// to use a hook, first register your mutator using REGISTER_MUTATOR +// then create your function using MUTATOR_HOOKFUNCTION + /** * Called when a client command is parsed * NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; @@ -179,3 +184,18 @@ MUTATOR_HOOKABLE(DrawViewModel, EV_DrawViewModel); /** Called when updating the view's liquid contents, return true to disable the standard checks and apply your own */ MUTATOR_HOOKABLE(HUD_Contents, EV_NO_ARGS); + +/** Return true to disable player model/color forcing */ +#define EV_ForcePlayermodels_Skip(i, o) \ + /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \ + /** is local */ i(bool, MUTATOR_ARGV_1_bool) \ + /**/ +MUTATOR_HOOKABLE(ForcePlayermodels_Skip, EV_ForcePlayermodels_Skip); + +/** Called when damage info is received on the client, useful for playing explosion effects */ +#define EV_DamageInfo(i, o) \ + /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \ + /** death type */ i(int, MUTATOR_ARGV_1_int) \ + /** hit origin */ i(vector, MUTATOR_ARGV_2_vector) \ + /**/ +MUTATOR_HOOKABLE(DamageInfo, EV_DamageInfo);