diff --git a/src/engine/host_state.cpp b/src/engine/host_state.cpp index 075f8a4b..77fedbfe 100644 --- a/src/engine/host_state.cpp +++ b/src/engine/host_state.cpp @@ -423,7 +423,12 @@ void CHostState::LoadConfig(void) const } if (CommandLine()->CheckParm("-offline")) { - Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec system/autoexec_offline.cfg\n", cmd_source_t::kCommandSrcCode); +#ifndef CLIENT_DLL + Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec system/offline_server.cfg\n", cmd_source_t::kCommandSrcCode); +#endif //!CLIENT_DLL +#ifndef DEDICATED + Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec system/offline_client.cfg\n", cmd_source_t::kCommandSrcCode); +#endif // !DEDICATED } #ifndef CLIENT_DLL Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec liveapi.cfg\n", cmd_source_t::kCommandSrcCode); diff --git a/src/resource/batch/clean_sdk.bat b/src/resource/batch/clean_sdk.bat index 60c6e604..bf34f111 100644 --- a/src/resource/batch/clean_sdk.bat +++ b/src/resource/batch/clean_sdk.bat @@ -22,6 +22,7 @@ del /Q "%~dp0..\platform\cfg\englishclient_build_vpk.cfg" del /Q "%~dp0..\platform\cfg\englishclient_extract_vpk.cfg" del /Q "%~dp0..\platform\cfg\englishserver_build_vpk.cfg" del /Q "%~dp0..\platform\cfg\englishserver_extract_vpk.cfg" +del /Q "%~dp0..\platform\cfg\system\autoexec_offline.cfg" del /Q "%~dp0..\platform\cfg\system\launcher.vdf" del /Q "%~dp0..\platform\cfg\system\keymap.vdf" del /Q "%~dp0..\platform\cfg\system\layout.ini" diff --git a/src/resource/cfg/system/offline_client.cfg b/src/resource/cfg/system/offline_client.cfg new file mode 100644 index 00000000..8a504204 --- /dev/null +++ b/src/resource/cfg/system/offline_client.cfg @@ -0,0 +1,16 @@ +/////////////////////// offline_client configuration file. +// This file is executed automatically on startup when the +// '-offline' parameter is passed to the application. + +// Do not authenticate with the master servers. +cl_onlineAuthEnable "0" + +// Do not send crash logs. +backtrace_enabled "0" + +// Disable matchmaking. +pylon_matchmaking_enabled "0" + +// Set a name as this would otherwise be empty, the server +// will reject us if our name is empty or invalid. +cl_setname "unnamed" diff --git a/src/resource/cfg/system/autoexec_offline.cfg b/src/resource/cfg/system/offline_server.cfg similarity index 52% rename from src/resource/cfg/system/autoexec_offline.cfg rename to src/resource/cfg/system/offline_server.cfg index 8b6c46f7..cf04880f 100644 --- a/src/resource/cfg/system/autoexec_offline.cfg +++ b/src/resource/cfg/system/offline_server.cfg @@ -1,10 +1,9 @@ -/////////////////////// offline configuration file. -// This file is executed automatically on startup -// when '-offline' is passed to the application. +/////////////////////// offline_client configuration file. +// This file is executed automatically on startup when the +// '-offline' parameter is passed to the application. // Do not authenticate with the master servers. sv_onlineAuthEnable "0" -cl_onlineAuthEnable "0" // Do not send crash logs. backtrace_enabled "0"