]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/events.qh
Make work the string fixup function called inside REPLICATE so we can get rid of...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / events.qh
index ee5d18a69157a9d6210bc211ed0f813748578442..c9c8ab8517be036b29d6c1ec9d5798aee2eb41f1 100644 (file)
@@ -317,8 +317,17 @@ MUTATOR_HOOKABLE(PlayerPreThink, EV_PlayerPreThink);
     /**/
 MUTATOR_HOOKABLE(GetPressedKeys, EV_GetPressedKeys);
 
-/** is meant to call GetCvars_handle*(get_cvars_s, get_cvars_f, cvarfield, "cvarname") for cvars this mutator needs from the client */
-// NOTE: requesting cvar values (get_cvars_f 0) is deprecated
+/**
+ * is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.:
+       MUTATOR_HOOKFUNCTION(mymutator, GetCvars)
+       {
+               GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar");
+               return false;
+       }
+ * Usually you can just use REPLICATE instead of this hook, e.g.:
+       REPLICATE(cvar_mycvar, int, "mycvar");
+ * NOTE: requesting cvar values (get_cvars_f 0) is deprecated
+ */
 #define EV_GetCvars(i, o) \
     /**/ i(float, get_cvars_f) \
     /**/ i(string, get_cvars_s) \