From 1b2c7d6b6950d0da828d9b2b4ec28e633d0fec62 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sun, 21 Jan 2024 04:14:05 +1000 Subject: [PATCH] cvar: add some missing registrations Closes https://gitlab.com/xonotic/darkplaces/-/issues/405 Signed-off-by: bones_was_here --- cap_ogg.c | 1 + netconn.c | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/cap_ogg.c b/cap_ogg.c index 6218e8ad..e0f85994 100644 --- a/cap_ogg.c +++ b/cap_ogg.c @@ -586,6 +586,7 @@ void SCR_CaptureVideo_Ogg_Init(void) Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_mininterval); Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_keyframe_auto_threshold); Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_noise_sensitivity); + Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_sharpness); Cvar_RegisterVariable(&cl_capturevideo_ogg_vorbis_quality); } diff --git a/netconn.c b/netconn.c index c21e1484..0a5a9b9a 100644 --- a/netconn.c +++ b/netconn.c @@ -52,14 +52,14 @@ static cvar_t sv_masters [] = #ifdef CONFIG_MENU static cvar_t sv_qwmasters [] = { - {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster1", "", "user-chosen qwmaster server 1"}, - {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster2", "", "user-chosen qwmaster server 2"}, - {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster3", "", "user-chosen qwmaster server 3"}, - {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "sv_qwmaster4", "", "user-chosen qwmaster server 4"}, - {CF_CLIENT | CF_SERVER, "sv_qwmasterextra1", "master.quakeservers.net:27000", "Global master server. (admin: unknown)"}, - {CF_CLIENT | CF_SERVER, "sv_qwmasterextra2", "asgaard.morphos-team.net:27000", "Global master server. (admin: unknown)"}, - {CF_CLIENT | CF_SERVER, "sv_qwmasterextra3", "qwmaster.ocrana.de:27000", "German master server. (admin: unknown)"}, - {CF_CLIENT | CF_SERVER, "sv_qwmasterextra4", "qwmaster.fodquake.net:27000", "Global master server. (admin: unknown)"}, + {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster1", "", "user-chosen qwmaster server 1"}, + {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster2", "", "user-chosen qwmaster server 2"}, + {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster3", "", "user-chosen qwmaster server 3"}, + {CF_CLIENT | CF_ARCHIVE, "sv_qwmaster4", "", "user-chosen qwmaster server 4"}, + {CF_CLIENT, "sv_qwmasterextra1", "master.quakeservers.net:27000", "Global master server. (admin: unknown)"}, + {CF_CLIENT, "sv_qwmasterextra2", "asgaard.morphos-team.net:27000", "Global master server. (admin: unknown)"}, + {CF_CLIENT, "sv_qwmasterextra3", "qwmaster.ocrana.de:27000", "German master server. (admin: unknown)"}, + {CF_CLIENT, "sv_qwmasterextra4", "qwmaster.fodquake.net:27000", "Global master server. (admin: unknown)"}, }; #endif @@ -4064,7 +4064,9 @@ void Net_SlistQW_f(cmd_state_t *cmd) void NetConn_Init(void) { int i; + unsigned j; lhnetaddress_t tempaddress; + netconn_mempool = Mem_AllocPool("network connections", 0, NULL); Cmd_AddCommand(CF_SHARED, "net_stats", Net_Stats_f, "print network statistics"); #ifdef CONFIG_MENU @@ -4120,8 +4122,12 @@ void NetConn_Init(void) Cvar_RegisterVariable(&sv_public); Cvar_RegisterVariable(&sv_public_rejectreason); Cvar_RegisterVariable(&sv_heartbeatperiod); - for (uint8_t masternum = 0; masternum < DPMASTER_COUNT; ++masternum) - Cvar_RegisterVariable(&sv_masters[masternum]); + for (j = 0; j < DPMASTER_COUNT; ++j) + Cvar_RegisterVariable(&sv_masters[j]); +#ifdef CONFIG_MENU + for (j = 0; j < QWMASTER_COUNT; ++j) + Cvar_RegisterVariable(&sv_qwmasters[j]); +#endif Cvar_RegisterVariable(&gameversion); Cvar_RegisterVariable(&gameversion_min); Cvar_RegisterVariable(&gameversion_max); -- 2.39.2