Execute 'autoexec' and 'autoexec_dev' after server and client to override any ConVar's more easily

This commit is contained in:
Amos 2022-01-20 03:10:01 +01:00
parent a73b05d4b0
commit 24dd364ebf
2 changed files with 4 additions and 4 deletions

View File

@ -31,15 +31,15 @@ void __fastcall HFrameStageNotify(CHLClient* rcx, ClientFrameStage_t frameStage)
if (!g_pCmdLine->CheckParm("-devsdk"))
{
IVEngineClient_CommandExecute(NULL, "exec autoexec.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec_server.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec_client.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec.cfg");
}
else // Development configs.
{
IVEngineClient_CommandExecute(NULL, "exec autoexec_dev.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec_server_dev.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec_client_dev.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec_dev.cfg");
}
*(bool*)m_bRestrictServerCommands = true; // Restrict commands.

View File

@ -134,19 +134,19 @@ void HCHostState_FrameUpdate(void* rcx, void* rdx, float time)
if (!g_pCmdLine->CheckParm("-devsdk"))
{
IVEngineClient_CommandExecute(NULL, "exec autoexec.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec_server.cfg");
#ifndef DEDICATED
IVEngineClient_CommandExecute(NULL, "exec autoexec_client.cfg");
#endif // !DEDICATED
IVEngineClient_CommandExecute(NULL, "exec autoexec.cfg");
}
else // Development configs.
{
IVEngineClient_CommandExecute(NULL, "exec autoexec_dev.cfg");
IVEngineClient_CommandExecute(NULL, "exec autoexec_server_dev.cfg");
#ifndef DEDICATED
IVEngineClient_CommandExecute(NULL, "exec autoexec_client_dev.cfg");
#endif // !DEDICATED
IVEngineClient_CommandExecute(NULL, "exec autoexec_dev.cfg");
}
*(bool*)m_bRestrictServerCommands = true; // Restrict commands.