2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-17 17:17:56 +03:00

Merge pull request #298 from dreamstalker/Host_Quit_Restart_f_fix

Fixed Host_Quit_Restart_f.
This commit is contained in:
LevShisterov 2016-12-30 00:39:08 +05:00 committed by GitHub
commit 0a139c728e

View File

@ -498,24 +498,19 @@ void Host_Quit_Restart_f(void)
giActive = DLL_RESTART; giActive = DLL_RESTART;
giStateInfo = 4; giStateInfo = 4;
if (g_psv.active || (g_pcls.state == ca_active && g_pcls.trueaddress[0] && g_pPostRestartCmdLineArgs)) if (g_psv.active)
{ {
Q_strcat(g_pPostRestartCmdLineArgs, " +connect "); if (g_psvs.maxclients == 1 && g_pcls.state == ca_active && g_pPostRestartCmdLineArgs)
Q_strcat(g_pPostRestartCmdLineArgs, g_pcls.servername);
}
else
{
if (g_psvs.maxclients == 1 && g_pcls.state == ca_active)
{
if (g_pPostRestartCmdLineArgs)
{ {
Cbuf_AddText("save quick\n"); Cbuf_AddText("save quick\n");
Cbuf_Execute(); Cbuf_Execute();
Q_strcat(g_pPostRestartCmdLineArgs, " +load quick"); Q_strcat(g_pPostRestartCmdLineArgs, " +load quick");
} }
} }
else if (g_pcls.state == ca_active && g_pcls.trueaddress[0] && g_pPostRestartCmdLineArgs)
{
Q_strcat(g_pPostRestartCmdLineArgs, " +connect ");
Q_strcat(g_pPostRestartCmdLineArgs, g_pcls.servername);
} }
} }