From 48a1f7f94dda82004c5f7ef181788d511921872f Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 24 Aug 2022 22:17:29 +0100 Subject: [PATCH] Revert the reversion of 2.2 information. - Corrects the definition for cv_kicktime. - Moves its registering to the correct place for being saved to the config. - Restore LUAh_GameQuit. --- src/d_clisrv.c | 6 ++++-- src/d_netcmd.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 0cc586ede..cffd2e25e 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -189,7 +189,7 @@ consvar_t cv_playbackspeed = CVAR_INIT ("playbackspeed", "1", 0, playbackspeed_c consvar_t cv_httpsource = CVAR_INIT ("http_source", "", CV_SAVE, NULL, NULL); -consvar_t cv_kicktime = {"kicktime", "10", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_kicktime = CVAR_INIT ("kicktime", "10", CV_SAVE, CV_Unsigned, NULL); static inline void *G_DcpyTiccmd(void* dest, const ticcmd_t* src, const size_t n) { @@ -3024,6 +3024,9 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum) #ifdef DUMPCONSISTENCY if (msg == KICK_MSG_CON_FAIL) SV_SavedGame(); #endif + + LUAh_GameQuit(false); + D_QuitNetGame(); CL_Reset(); D_StartTitle(); @@ -3236,7 +3239,6 @@ void D_ClientServerInit(void) #ifndef NONET COM_AddCommand("getplayernum", Command_GetPlayerNum); COM_AddCommand("kick", Command_Kick); - CV_RegisterVar(&cv_kicktime); COM_AddCommand("ban", Command_Ban); COM_AddCommand("banip", Command_BanIP); COM_AddCommand("clearbans", Command_ClearBans); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 2a28a454b..c36922275 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -789,7 +789,7 @@ void D_RegisterServerCommands(void) COM_AddCommand("ping", Command_Ping_f); CV_RegisterVar(&cv_nettimeout); CV_RegisterVar(&cv_jointimeout); - + CV_RegisterVar(&cv_kicktime); CV_RegisterVar(&cv_skipmapcheck); CV_RegisterVar(&cv_sleep); CV_RegisterVar(&cv_maxping);