From e9135c7694f848cce8d7d209f48c7114d26be746 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 7 Mar 2017 23:34:04 +1000 Subject: [PATCH] Fix HUD_WriteCvars hook a file parameter --- qcsrc/client/hud/hud_config.qc | 2 +- qcsrc/client/mutators/events.qh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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); -- 2.39.2