git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13059
d7cf8633-e32d-0410-b094-
e92efae38249
if (!cls.demostarting) // only quit if not starting another demo
if (Sys_CheckParm("-demo") || Sys_CheckParm("-capturedemo"))
host.state = host_shutdown;
-
- cls.demonum = -1;
-
}
/*
====================
CL_PlayDemo_f
-play [demoname]
+playdemo [demoname]
====================
*/
void CL_PlayDemo_f(cmd_state_t *cmd)
if (Cmd_Argc(cmd) != 2)
{
- Con_Print("play <demoname> : plays a demo\n");
+ Con_Print("playdemo <demoname> : plays a demo\n");
return;
}
cls.demostarting = true;
// disconnect from server
- CL_Disconnect ();
- SV_Shutdown ();
+ if(cls.state == ca_connected)
+ CL_Disconnect();
+ if(sv.active)
+ SV_Shutdown();
// update networking ports (this is mainly just needed at startup)
NetConn_UpdateSockets();
{
if (!cls.demoplayback)
return;
- CL_Disconnect ();
- SV_Shutdown ();
+ CL_Disconnect();
}
// LadyHavoc: pausedemo command