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.
This commit is contained in:
toaster 2022-08-24 22:17:29 +01:00
parent a59e28f339
commit 48a1f7f94d
2 changed files with 5 additions and 3 deletions

View file

@ -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);

View file

@ -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);