mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Rename 'cl_showconsole' and 'cl_showbrowser' to 'toggleconsole' and 'togglebrowser'
Suppress engine warnings due to missing commands (stripped for retail but still bound to key).
This commit is contained in:
parent
4f2ed4ae75
commit
32a158903f
@ -350,8 +350,6 @@ void ConCommand::Init(void)
|
||||
//-------------------------------------------------------------------------
|
||||
// CLIENT DLL |
|
||||
ConCommand::Create("script_client", "Run input code as CLIENT script on the VM.", FCVAR_CLIENTDLL | FCVAR_CHEAT, SQVM_ClientScript_f, nullptr);
|
||||
ConCommand::Create("cl_showconsole", "Opens the developer console.", FCVAR_CLIENTDLL | FCVAR_RELEASE, GameConsole_Invoke_f, nullptr);
|
||||
ConCommand::Create("cl_showbrowser", "Opens the server browser.", FCVAR_CLIENTDLL | FCVAR_RELEASE, ServerBrowser_Invoke_f, nullptr);
|
||||
ConCommand::Create("rcon", "Forward RCON query to remote server. | Usage: rcon \"<query>\".", FCVAR_CLIENTDLL | FCVAR_RELEASE, RCON_CmdQuery_f, nullptr);
|
||||
ConCommand::Create("rcon_disconnect", "Disconnect from RCON server.", FCVAR_CLIENTDLL | FCVAR_RELEASE, RCON_Disconnect_f, nullptr);
|
||||
|
||||
@ -359,6 +357,9 @@ void ConCommand::Init(void)
|
||||
ConCommand::Create("con_removeline", "Removes a range of lines from the developer console.", FCVAR_CLIENTDLL | FCVAR_RELEASE, CON_RemoveLine_f, nullptr);
|
||||
ConCommand::Create("con_clearlines", "Clears all lines from the developer console.", FCVAR_CLIENTDLL | FCVAR_RELEASE, CON_ClearLines_f, nullptr);
|
||||
ConCommand::Create("con_clearhistory", "Clears all submissions from the developer console history.", FCVAR_CLIENTDLL | FCVAR_RELEASE, CON_ClearHistory_f, nullptr);
|
||||
|
||||
ConCommand::Create("toggleconsole", "Show/hide the developer console.", FCVAR_CLIENTDLL | FCVAR_RELEASE, ToggleConsole_f, nullptr);
|
||||
ConCommand::Create("togglebrowser", "Show/hide the server browser.", FCVAR_CLIENTDLL | FCVAR_RELEASE, ToggleBrowser_f, nullptr);
|
||||
//-------------------------------------------------------------------------
|
||||
// UI DLL |
|
||||
ConCommand::Create("script_ui", "Run input code as UI script on the VM.", FCVAR_CLIENTDLL | FCVAR_CHEAT, SQVM_UIScript_f, nullptr);
|
||||
|
@ -82,22 +82,24 @@ void MP_HostName_Changed_f(IConVar* pConVar, const char* pOldString, float flOld
|
||||
#ifndef DEDICATED
|
||||
/*
|
||||
=====================
|
||||
GameConsole_Invoke_f
|
||||
ToggleConsole_f
|
||||
=====================
|
||||
*/
|
||||
void GameConsole_Invoke_f(const CCommand& args)
|
||||
void ToggleConsole_f(const CCommand& args)
|
||||
{
|
||||
g_pConsole->m_bActivate = !g_pConsole->m_bActivate;
|
||||
g_pConsole->m_bActivate ^= true;
|
||||
ResetInput(); // Disable input to game when console is drawn.
|
||||
}
|
||||
|
||||
/*
|
||||
=====================
|
||||
ServerBrowser_Invoke_f
|
||||
ToggleBrowser_f
|
||||
=====================
|
||||
*/
|
||||
void ServerBrowser_Invoke_f(const CCommand& args)
|
||||
void ToggleBrowser_f(const CCommand& args)
|
||||
{
|
||||
g_pBrowser->m_bActivate = !g_pBrowser->m_bActivate;
|
||||
g_pBrowser->m_bActivate ^= true;
|
||||
ResetInput(); // Disable input to game when browser is drawn.
|
||||
}
|
||||
#endif // !DEDICATED
|
||||
#ifndef CLIENT_DLL
|
||||
|
@ -12,8 +12,8 @@ inline auto _DownloadPlaylists_f = p_DownloadPlaylists_f.RCast<void(*)(void)>();
|
||||
void MP_GameMode_Changed_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
||||
void MP_HostName_Changed_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
||||
#ifndef DEDICATED
|
||||
void GameConsole_Invoke_f(const CCommand& args);
|
||||
void ServerBrowser_Invoke_f(const CCommand& args);
|
||||
void ToggleConsole_f(const CCommand& args);
|
||||
void ToggleBrowser_f(const CCommand& args);
|
||||
#endif // !DEDICATED
|
||||
#ifndef CLIENT_DLL
|
||||
void Host_Kick_f(const CCommand& args);
|
||||
|
Loading…
x
Reference in New Issue
Block a user