diff --git a/libs/console/client.c b/libs/console/client.c index 0c4970535..258821a1b 100644 --- a/libs/console/client.c +++ b/libs/console/client.c @@ -119,7 +119,7 @@ static cvar_t con_speed_cvar = { static exprenum_t cl_conmode_enum; static exprtype_t cl_conmode_type = { .name = "cl_conmode", - .size = sizeof (int), + .size = sizeof (con_data.exec_line), .data = &cl_conmode_enum, .get_string = cexpr_enum_get_string, }; @@ -144,14 +144,13 @@ static exprenum_t cl_conmode_enum = { &cl_conmode_type, &cl_conmode_symtab, }; -static char *cl_conmode; static cvar_t cl_conmode_cvar = { .name = "cl_conmode", .description = "Set the console input mode (command, chat, rcon)", .default_value = "command", .flags = CVAR_ARCHIVE, - .value = { .type = &cl_conmode_type, .value = &cl_conmode }, + .value = { .type = &cl_conmode_type, .value = &con_data.exec_line }, }; #define NUM_CON_TIMES 4 diff --git a/libs/console/server.c b/libs/console/server.c index bf2fb09e0..b0ba04a31 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -95,7 +95,7 @@ static cvar_t sv_logfile_cvar = { static exprenum_t sv_conmode_enum; static exprtype_t sv_conmode_type = { .name = "sv_conmode", - .size = sizeof (int), + .size = sizeof (sv_con_data.exec_line), .data = &sv_conmode_enum, .get_string = cexpr_enum_get_string, }; @@ -117,14 +117,13 @@ static exprenum_t sv_conmode_enum = { &sv_conmode_type, &sv_conmode_symtab, }; -static char *sv_conmode; static cvar_t sv_conmode_cvar = { .name = "sv_conmode", .description = "Set the console input mode (command, chat)", .default_value = "command", .flags = CVAR_NONE, - .value = { .type = &sv_conmode_type, .value = &sv_conmode }, + .value = { .type = &sv_conmode_type, .value = &sv_con_data.exec_line }, }; static int sv_use_curses; static cvar_t sv_use_curses_cvar = {