From 0db2aebfdaf7cf3ecea0e7184b249a1dc553586a Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 30 Jan 2025 13:11:30 +0100 Subject: [PATCH] dont register a crapton of pointless stuff for dedi should cleanup dedi config significantly lmao --- src/d_netcmd.c | 13 +++++++++---- src/k_kart.c | 29 +++++++++++++++++------------ src/k_kart.h | 3 ++- 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index ef7846db4..57ba1b783 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -650,7 +650,6 @@ void D_RegisterServerCommands(void) COM_AddCommand("addfilelocal", Command_Addfilelocal); COM_AddCommand("addfile", Command_Addfile); COM_AddCommand("addskins", Command_Addskins); - COM_AddCommand("localskin", Command_GLocalSkin); COM_AddCommand("listwad", Command_ListWADS_f); COM_AddCommand("listmapthings", Command_ListDoomednums_f); COM_AddCommand("listunusedsprites", Command_ListUnusedSprites_f); @@ -715,7 +714,7 @@ void D_RegisterServerCommands(void) CV_RegisterVar(&cv_competitionboxes); CV_RegisterVar(&cv_matchboxes); - K_RegisterKartStuff(); // SRB2kart + K_RegisterServerKartStuff(); // SRB2kart CV_RegisterVar(&cv_ringslinger); @@ -794,8 +793,6 @@ void D_RegisterServerCommands(void) CV_RegisterVar(&cv_maxdemosize); CV_RegisterVar(&cv_demochangemap); - CV_RegisterVar(&cv_keyboardlayout); - #ifndef NOBLUAJIT CV_RegisterVar(&cv_luajit); #endif @@ -857,6 +854,10 @@ void D_RegisterClientCommands(void) COM_AddCommand("stopmovie", Command_StopMovie_f); COM_AddCommand("minigen", M_MinimapGenerate); + COM_AddCommand("localskin", Command_GLocalSkin); + + K_RegisterClientKartStuff(); // SRB2kart + CV_RegisterVar(&cv_screenshot_option); CV_RegisterVar(&cv_screenshot_folder); CV_RegisterVar(&cv_moviemode); @@ -907,7 +908,9 @@ void D_RegisterClientCommands(void) #ifdef SEENAMES CV_RegisterVar(&cv_seenames); #endif + CV_RegisterVar(&cv_rollingdemos); + CV_RegisterVar(&cv_netstat); CV_RegisterVar(&cv_netticbuffer); CV_RegisterVar(&cv_mindelay); @@ -926,6 +929,8 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_cechotoggle); + CV_RegisterVar(&cv_keyboardlayout); + // time attack ghost options are also saved to config CV_RegisterVar(&cv_ghost_besttime); CV_RegisterVar(&cv_ghost_bestlap); diff --git a/src/k_kart.c b/src/k_kart.c index cfe22bdce..4de71d487 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -743,19 +743,8 @@ boolean K_UseColorHud(void) //{ SRB2kart Net Variables -void K_RegisterKartStuff(void) +void K_RegisterServerKartStuff(void) { - HudColor_cons_t[0].value = 0; - HudColor_cons_t[0].strvalue = "Skin Color"; - - for (INT32 i = 1; i < MAXSKINCOLORS; i++) - { - HudColor_cons_t[i].value = i; - HudColor_cons_t[i].strvalue = KartColor_Names[i]; // SRB2kart - } - HudColor_cons_t[MAXSKINCOLORS].value = 0; - HudColor_cons_t[MAXSKINCOLORS].strvalue = NULL; - CV_RegisterVar(&cv_sneaker); CV_RegisterVar(&cv_rocketsneaker); CV_RegisterVar(&cv_invincibility); @@ -805,6 +794,22 @@ void K_RegisterKartStuff(void) CV_RegisterVar(&cv_kartdebugcheckpoint); CV_RegisterVar(&cv_kartdebugnodes); CV_RegisterVar(&cv_kartdebugcolorize); +} + +// Registers kart client commands and variables. +// Nothing needed for a dedicated server should be registered here. +void K_RegisterClientKartStuff(void) +{ + HudColor_cons_t[0].value = 0; + HudColor_cons_t[0].strvalue = "Skin Color"; + + for (INT32 i = 1; i < MAXSKINCOLORS; i++) + { + HudColor_cons_t[i].value = i; + HudColor_cons_t[i].strvalue = KartColor_Names[i]; // SRB2kart + } + HudColor_cons_t[MAXSKINCOLORS].value = 0; + HudColor_cons_t[MAXSKINCOLORS].strvalue = NULL; #define REG_HUD_OFFSET_X(name)\ CV_RegisterVar(&cv_##name##_xoffset); diff --git a/src/k_kart.h b/src/k_kart.h index dde5e21af..2fa2ab6e3 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -21,7 +21,8 @@ UINT8 K_GetKartColorByName(const char *name); UINT8 K_GetHudColor(void); boolean K_UseColorHud(void); -void K_RegisterKartStuff(void); +void K_RegisterServerKartStuff(void); +void K_RegisterClientKartStuff(void); extern consvar_t cv_coloredspeedlines, cv_coloredsneakertrail; extern consvar_t cv_bananajitter;