ConVar/ConCommands improvements.

This commit is contained in:
IcePixelx
2021-12-28 01:14:56 +01:00
parent 899bde2af0
commit f6a4b011f0
5 changed files with 28 additions and 12 deletions

View File

@@ -32,8 +32,8 @@ void __fastcall HFrameStageNotify(CHLClient* rcx, ClientFrameStage_t frameStage)
IVEngineClient_CommandExecute(NULL, "exec autoexec_client.cfg");
*(bool*)m_bRestrictServerCommands = true; // Restrict commands.
void* disconnect = g_pCvar->FindCommand("disconnect");
*(std::int32_t*)((std::uintptr_t)disconnect + 0x38) |= FCVAR_SERVER_CAN_EXECUTE; // Make sure server is not restricted to this.
ConCommandBase* disconnect = (ConCommandBase*)g_pCvar->FindCommand("disconnect");
disconnect->AddFlags(FCVAR_SERVER_CAN_EXECUTE); // Make sure server is not restricted to this.
if (net_userandomkey->m_pParent->m_iValue == 1)
{