diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index 61f0b83db..cd69e52b3 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -1049,6 +1049,15 @@ void CL_ReRecord_f (void) CL_BeginServerReconnect(); } +#ifdef WEBCLIENT +void CL_PlayDownloadedDemo(char *name, qboolean success) +{ + if (success == false) + Con_Printf("Failed to download %s\n", name); + else + Cbuf_AddText(va("playdemo %s\n", name), RESTRICT_LOCAL); +} +#endif /* ==================== @@ -1072,6 +1081,15 @@ void CL_PlayDemo_f (void) return; } +#ifdef WEBCLIENT + if (!strncmp(Cmd_Argv(1), "ftp://", 6) || !strncmp(Cmd_Argv(1), "http://", 7)) + { + if (Cmd_ExecLevel == RESTRICT_LOCAL) + HTTP_CL_Get(Cmd_Argv(1), COM_SkipPath(Cmd_Argv(1)), CL_PlayDownloadedDemo); + return; + } +#endif + // // disconnect from server //