From: terencehill Date: Fri, 30 Mar 2018 22:56:52 +0000 (+0200) Subject: Document creation of mutator hooks X-Git-Tag: xonotic-v0.8.5~2211 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ad4d738c3e5b280bc8166b0838f28c80c7aac1e3;p=xonotic%2Fxonotic-data.pk3dir.git Document creation of mutator hooks --- diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index 24d634ce8..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; diff --git a/qcsrc/menu/mutators/events.qh b/qcsrc/menu/mutators/events.qh index 1df38f5af..0c5056b97 100644 --- a/qcsrc/menu/mutators/events.qh +++ b/qcsrc/menu/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 + // globals string cmd_name; diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 6853c04a1..6cdf94feb 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -3,6 +3,9 @@ #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 player becomes observer, after shared setup */ #define EV_MakePlayerObserver(i, o) \