- Add unset command for cvars created by the user

- Fix crash bug when maximum number of cvars has been reached
- Fix cvar_restart
- Add possibility to cleanly switch mods ingame (#2819)
This commit is contained in:
Thilo Schulz 2009-11-09 22:41:42 +00:00
parent 606ce66726
commit 258429efe7
8 changed files with 414 additions and 143 deletions

View file

@ -1030,6 +1030,18 @@ void CL_NextDemo( void ) {
//======================================================================
/*
=====================
CL_ShutdownVMs
=====================
*/
void CL_ShutdownVMs(void)
{
CL_ShutdownCGame();
CL_ShutdownUI();
}
/*
=====================
CL_ShutdownAll
@ -1251,6 +1263,9 @@ void CL_Disconnect( qboolean showMainMenu ) {
CL_WritePacket();
}
// Remove pure paks
FS_PureServerSetLoadedPaks("", "");
CL_ClearState ();
// wipe the client connection
@ -1733,6 +1748,19 @@ void CL_Vid_Restart_f( void ) {
}
}
/*
=================
CL_Snd_Restart
Restart the sound subsystem
=================
*/
void CL_Snd_Restart(void)
{
S_Shutdown();
S_Init();
}
/*
=================
CL_Snd_Restart_f
@ -1742,10 +1770,9 @@ The cgame and game must also be forced to restart because
handles will be invalid
=================
*/
void CL_Snd_Restart_f( void ) {
S_Shutdown();
S_Init();
void CL_Snd_Restart_f(void)
{
CL_Snd_Restart();
CL_Vid_Restart_f();
}