]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a hook to save custom HUD cvars from a mutator
authorMario <mario@smbclan.net>
Tue, 7 Mar 2017 13:21:26 +0000 (23:21 +1000)
committerMario <mario@smbclan.net>
Tue, 7 Mar 2017 13:21:26 +0000 (23:21 +1000)
qcsrc/client/hud/hud_config.qc
qcsrc/client/mutators/events.qh

index f2b23e39256217b9f33019b51c2e94bdd1e8b59a..c358cf6438a1f734fde5729995d2cf0e0682d47f 100644 (file)
@@ -226,6 +226,8 @@ void HUD_Panel_ExportCfg(string cfgname)
                        }
                        HUD_Write("\n");
                }
+               MUTATOR_CALLHOOK(HUD_WriteCvars);
+
                HUD_Write("menu_sync\n"); // force the menu to reread the cvars, so that the dialogs are updated
 
                LOG_INFOF(_("^2Successfully exported to %s! (Note: It's saved in data/data/)\n"), filename);
index edd178199d5c17b0d3eafb191748afc890cb600f..248fc30398c131ad93e9e37fedbd1a9843c0c96d 100644 (file)
@@ -164,3 +164,5 @@ MUTATOR_HOOKABLE(DrawScoreboard, EV_NO_ARGS);
        /** mySize */                   i(vector, MUTATOR_ARGV_1_vector) \
        /**/
 MUTATOR_HOOKABLE(DrawInfoMessages, EV_DrawInfoMessages);
+
+MUTATOR_HOOKABLE(HUD_WriteCvars, EV_NO_ARGS);