From 152d3f8813456b48dc6e52afc9e4d4300341d14f Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 29 Apr 2009 06:27:09 +0000 Subject: [PATCH] Fix CVAR_MULTI flag git-svn-id: https://svn.eduke32.com/eduke32@1353 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/osdcmds.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 3d51b7153..ef37516e5 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -1326,6 +1326,13 @@ static int32_t osdcmd_inittimer(const osdfuncparm_t *parm) return OSDCMD_OK; } +static int32_t osdcmd_cvar_set_multi(const osdfuncparm_t *parm) +{ + int32_t r = osdcmd_cvar_set(parm); + G_UpdatePlayerFromMenu(); + + return r; +} int32_t registerosdcommands(void) { @@ -1406,6 +1413,7 @@ int32_t registerosdcommands(void) { OSD_RegisterCvar(&cvars_game[i]); if (cvars_game[i].type == CVAR_FUNCPTR) OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, cvars_game[i].var); + else if (cvars_game[i].type & CVAR_MULTI) OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set_multi); else OSD_RegisterFunction(cvars_game[i].name, cvars_game[i].helpstr, osdcmd_cvar_set); }