mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Core: add option to run the game fully offline
The game can now be ran fully offline by providing '-offline' to the command line arguments. The engine will auto execute 'system/autoexec_offline.cfg' which overrides other autoexecs to ensure the game runs offline. The system/autoexec_offline.cfg file only overrides the variables it sets.
This commit is contained in:
parent
a702323181
commit
43e162711e
@ -250,7 +250,17 @@ void Systems_Init()
|
||||
|
||||
#ifdef DEDICATED
|
||||
InitCommandLineParameters();
|
||||
#endif // DEDICATED
|
||||
#else
|
||||
// Must append these here if user specified the -offline parameter so the
|
||||
// engine can take care of disabling the platform systems on time. The
|
||||
// dedicated server already has these disabled, so we don't need to check
|
||||
// for it here.
|
||||
if (CommandLine()->CheckParm("-offline"))
|
||||
{
|
||||
CommandLine()->AppendParm("-noorigin", "");
|
||||
CommandLine()->AppendParm("-nodiscord", "");
|
||||
}
|
||||
#endif// DEDICATED
|
||||
|
||||
// Script context registration callbacks.
|
||||
ScriptConstantRegister_Callback = ScriptConstantRegistrationCallback;
|
||||
|
@ -421,6 +421,10 @@ void CHostState::LoadConfig(void) const
|
||||
Cbuf_AddText(Cbuf_GetCurrentPlayer(), "exec tools/rcon_client_dev.cfg\n", cmd_source_t::kCommandSrcCode);
|
||||
#endif // !DEDICATED
|
||||
}
|
||||
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 liveapi.cfg\n", cmd_source_t::kCommandSrcCode);
|
||||
#endif //!CLIENT_DLL
|
||||
|
Loading…
x
Reference in New Issue
Block a user