From: Mario Date: Tue, 7 Mar 2017 13:34:04 +0000 (+1000) Subject: Fix HUD_WriteCvars hook a file parameter X-Git-Tag: xonotic-v0.8.2~109 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e9135c7694f848cce8d7d209f48c7114d26be746;p=xonotic%2Fxonotic-data.pk3dir.git Fix HUD_WriteCvars hook a file parameter --- diff --git a/qcsrc/client/hud/hud_config.qc b/qcsrc/client/hud/hud_config.qc index c358cf643..4897ba551 100644 --- a/qcsrc/client/hud/hud_config.qc +++ b/qcsrc/client/hud/hud_config.qc @@ -226,7 +226,7 @@ void HUD_Panel_ExportCfg(string cfgname) } HUD_Write("\n"); } - MUTATOR_CALLHOOK(HUD_WriteCvars); + MUTATOR_CALLHOOK(HUD_WriteCvars, fh); HUD_Write("menu_sync\n"); // force the menu to reread the cvars, so that the dialogs are updated diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index 248fc3039..ddadde897 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -165,4 +165,8 @@ MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS); /**/ MUTATOR_HOOKABLE(DrawInfoMessages, EV_DrawInfoMessages); -MUTATOR_HOOKABLE(HUD_WriteCvars, EV_NO_ARGS); +/** Called when drawing info messages, allows adding new info messages */ +#define EV_HUD_WriteCvars(i, o) \ + /** file */ i(float, MUTATOR_ARGV_0_float) \ + /**/ +MUTATOR_HOOKABLE(HUD_WriteCvars, EV_HUD_WriteCvars);