2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-04 02:55:50 +03:00

Fixed Host_Quit_Restart_f.

This commit is contained in:
Lev 2016-12-30 00:31:45 +05:00
parent 9c59407c9a
commit f28c4c4b4e

View File

@ -498,24 +498,19 @@ void Host_Quit_Restart_f(void)
giActive = DLL_RESTART;
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 ");
Q_strcat(g_pPostRestartCmdLineArgs, g_pcls.servername);
}
else
{
if (g_psvs.maxclients == 1 && g_pcls.state == ca_active)
{
if (g_pPostRestartCmdLineArgs)
if (g_psvs.maxclients == 1 && g_pcls.state == ca_active && g_pPostRestartCmdLineArgs)
{
Cbuf_AddText("save quick\n");
Cbuf_Execute();
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);
}
}