Open dp's download protocol to more client types (for qss's benefit). Work around some DP bugs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6072 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0218f2dcf2
commit
8ae9fe1141
2 changed files with 15 additions and 14 deletions
|
@ -3313,6 +3313,7 @@ void SVC_DirectConnect(int expectedreliablesequence)
|
||||||
{"NEHAHRABJP2", 0},
|
{"NEHAHRABJP2", 0},
|
||||||
{"NEHAHRABJP3", 1u<<SCP_BJP3},
|
{"NEHAHRABJP3", 1u<<SCP_BJP3},
|
||||||
{"DP7DP6", (1u<<SCP_DARKPLACES7)|(1u<<SCP_DARKPLACES6)}, //stupid shitty buggy crappy client
|
{"DP7DP6", (1u<<SCP_DARKPLACES7)|(1u<<SCP_DARKPLACES6)}, //stupid shitty buggy crappy client
|
||||||
|
{"DP8DP7", /*(1u<<SCP_DARKPLACES8)|*/(1u<<SCP_DARKPLACES7)}, //stupid shitty buggy crappy client
|
||||||
};
|
};
|
||||||
int p;
|
int p;
|
||||||
|
|
||||||
|
|
|
@ -759,8 +759,8 @@ void SVNQ_New_f (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MSG_WriteByte (&host_client->netchan.message, svc_stufftext);
|
// MSG_WriteByte (&host_client->netchan.message, svc_stufftext);
|
||||||
MSG_WriteString (&host_client->netchan.message, "csqc_progcrc \"\"\n");
|
// MSG_WriteString (&host_client->netchan.message, "csqc_progcrc \"\"\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (allow_download.value && (protext1||protext2))
|
else if (allow_download.value && (protext1||protext2))
|
||||||
|
@ -2459,12 +2459,12 @@ void SV_DarkPlacesDownloadChunk(client_t *cl, sizebuf_t *msg)
|
||||||
|
|
||||||
void SVDP_StartDownload_f(void)
|
void SVDP_StartDownload_f(void)
|
||||||
{
|
{
|
||||||
if (host_client->protocol != SCP_DARKPLACES7)
|
// if (host_client->protocol != SCP_DARKPLACES7)
|
||||||
return;
|
// return;
|
||||||
if (!host_client->download)
|
if (!host_client->download)
|
||||||
return;
|
return;
|
||||||
host_client->downloadstarted = true;
|
host_client->downloadstarted = true;
|
||||||
host_client->downloadacked = true;
|
host_client->downloadacked = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SV_DarkPlacesDownloadAck(client_t *cl)
|
void SV_DarkPlacesDownloadAck(client_t *cl)
|
||||||
|
@ -2504,7 +2504,7 @@ void SV_DarkPlacesDownloadAck(client_t *cl)
|
||||||
pos += csize;
|
pos += csize;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = va("\ncl_downloadfinished %u %i \"%s\"\n", (unsigned int)host_client->downloadsize, hashfunc_terminate_uint(hfunc, hctx), "");
|
s = va("\ncl_downloadfinished %u %i \"%s\"\n", (unsigned int)host_client->downloadsize, hashfunc_terminate_uint(hfunc, hctx), host_client->downloadfn);
|
||||||
ClientReliableWrite_Begin (cl, svc_stufftext, 2+strlen(s));
|
ClientReliableWrite_Begin (cl, svc_stufftext, 2+strlen(s));
|
||||||
ClientReliableWrite_String(cl, s);
|
ClientReliableWrite_String(cl, s);
|
||||||
|
|
||||||
|
@ -3659,11 +3659,11 @@ void SV_BeginDownload_f(void)
|
||||||
flocation_t loc;
|
flocation_t loc;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
if (ISNQCLIENT(host_client) && host_client->protocol != SCP_DARKPLACES7)
|
/*if (ISNQCLIENT(host_client) && host_client->protocol != SCP_DARKPLACES7)
|
||||||
{
|
{
|
||||||
SV_PrintToClient(host_client, PRINT_HIGH, "Your client isn't meant to support downloads\n");
|
SV_PrintToClient(host_client, PRINT_HIGH, "Your client isn't meant to support downloads\n");
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (ISQWCLIENT(host_client) && !strcmp(name, "ezquake-security.dll"))
|
if (ISQWCLIENT(host_client) && !strcmp(name, "ezquake-security.dll"))
|
||||||
|
@ -3767,17 +3767,17 @@ void SV_BeginDownload_f(void)
|
||||||
case DLERR_FILENOTFOUND:
|
case DLERR_FILENOTFOUND:
|
||||||
default:
|
default:
|
||||||
result = DLERR_FILENOTFOUND;
|
result = DLERR_FILENOTFOUND;
|
||||||
error = "Download could not be found\n";
|
error = "Download %s could not be found\n";
|
||||||
break;
|
break;
|
||||||
case DLERR_UNKNOWN:
|
case DLERR_UNKNOWN:
|
||||||
error = "Filesystem error\n";
|
error = "Download %s: Filesystem error\n";
|
||||||
break;
|
break;
|
||||||
case DLERR_PERMISSIONS:
|
case DLERR_PERMISSIONS:
|
||||||
error = "Download permission denied\n";
|
error = "Download %s: Permission denied\n";
|
||||||
break;
|
break;
|
||||||
case DLERR_REDIRECTFILE:
|
case DLERR_REDIRECTFILE:
|
||||||
result = DLERR_PERMISSIONS;
|
result = DLERR_PERMISSIONS;
|
||||||
error = "Client doesn't support file redirection\n";
|
error = "Client doesn't support file redirection for %s\n";
|
||||||
break;
|
break;
|
||||||
case DLERR_REDIRECTPACK:
|
case DLERR_REDIRECTPACK:
|
||||||
result = DLERR_PERMISSIONS;
|
result = DLERR_PERMISSIONS;
|
||||||
|
@ -3796,14 +3796,14 @@ void SV_BeginDownload_f(void)
|
||||||
#endif
|
#endif
|
||||||
if (ISNQCLIENT(host_client))
|
if (ISNQCLIENT(host_client))
|
||||||
{ //dp's download protocol
|
{ //dp's download protocol
|
||||||
SV_PrintToClient(host_client, PRINT_HIGH, error);
|
SV_PrintToClient(host_client, PRINT_HIGH, va(error, name));
|
||||||
|
|
||||||
ClientReliableWrite_Begin (host_client, svc_stufftext, 2+12);
|
ClientReliableWrite_Begin (host_client, svc_stufftext, 2+12);
|
||||||
ClientReliableWrite_String (host_client, "\nstopdownload\n");
|
ClientReliableWrite_String (host_client, "\nstopdownload\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SV_PrintToClient(host_client, PRINT_HIGH, error);
|
SV_PrintToClient(host_client, PRINT_HIGH, va(error, name));
|
||||||
|
|
||||||
ClientReliableWrite_Begin (host_client, ISQ2CLIENT(host_client)?svcq2_download:svc_download, 4);
|
ClientReliableWrite_Begin (host_client, ISQ2CLIENT(host_client)?svcq2_download:svc_download, 4);
|
||||||
ClientReliableWrite_Short (host_client, -1);
|
ClientReliableWrite_Short (host_client, -1);
|
||||||
|
|
Loading…
Reference in a new issue