Try to fix some stuff that was wrong in the last commit.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5769 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e3fdbfcdbd
commit
4de49e06d1
3 changed files with 34 additions and 9 deletions
|
@ -2195,13 +2195,16 @@ static void PM_UpdatePackageList(qboolean autoupdate, int retry);
|
||||||
static void PM_AllowPackageListQuery_Callback(void *ctx, promptbutton_t opt)
|
static void PM_AllowPackageListQuery_Callback(void *ctx, promptbutton_t opt)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
allowphonehome = (opt==PROMPT_YES);
|
|
||||||
|
|
||||||
//something changed, let it download now.
|
//something changed, let it download now.
|
||||||
for (i = 0; i < numdownloadablelists; i++)
|
if (opt!=PROMPT_CANCEL)
|
||||||
{
|
{
|
||||||
if (downloadablelist[i].status == SRCSTAT_UNKNOWN)
|
allowphonehome = (opt==PROMPT_YES);
|
||||||
downloadablelist[i].status = SRCSTAT_PENDING;
|
|
||||||
|
for (i = 0; i < numdownloadablelists; i++)
|
||||||
|
{
|
||||||
|
if (downloadablelist[i].status == SRCSTAT_UNKNOWN)
|
||||||
|
downloadablelist[i].status = (opt==PROMPT_YES)?SRCSTAT_PENDING:SRCSTAT_DISABLED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
PM_UpdatePackageList(false, 0);
|
PM_UpdatePackageList(false, 0);
|
||||||
}
|
}
|
||||||
|
@ -2222,7 +2225,10 @@ static void PM_UpdatePackageList(qboolean autoupdate, int retry)
|
||||||
|
|
||||||
#ifndef WEBCLIENT
|
#ifndef WEBCLIENT
|
||||||
for (i = 0; i < numdownloadablelists; i++)
|
for (i = 0; i < numdownloadablelists; i++)
|
||||||
downloadablelist[i].received = true;
|
{
|
||||||
|
if (downloadablelist[i].status == SRCSTAT_PENDING)
|
||||||
|
downloadablelist[i].status = SRCSTAT_FAILED;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
doautoupdate |= autoupdate;
|
doautoupdate |= autoupdate;
|
||||||
|
|
||||||
|
@ -2231,7 +2237,8 @@ static void PM_UpdatePackageList(qboolean autoupdate, int retry)
|
||||||
allowphonehome = true;
|
allowphonehome = true;
|
||||||
else if (allowphonehome == -1)
|
else if (allowphonehome == -1)
|
||||||
{
|
{
|
||||||
Menu_Prompt(PM_AllowPackageListQuery_Callback, NULL, "Query updates list?\n", "Okay", NULL, "Nope");
|
if (retry)
|
||||||
|
Menu_Prompt(PM_AllowPackageListQuery_Callback, NULL, "Query updates list?\n", "Okay", NULL, "Nope");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -2241,6 +2248,10 @@ static void PM_UpdatePackageList(qboolean autoupdate, int retry)
|
||||||
//kick off the initial tier of list-downloads.
|
//kick off the initial tier of list-downloads.
|
||||||
for (i = 0; i < numdownloadablelists; i++)
|
for (i = 0; i < numdownloadablelists; i++)
|
||||||
{
|
{
|
||||||
|
if (downloadablelist[i].status == SRCSTAT_DISABLED)
|
||||||
|
continue; //user disabled it. their choice. don't download it.
|
||||||
|
if (downloadablelist[i].status == SRCSTAT_UNKNOWN)
|
||||||
|
continue; //waiting to be enabled... we'll bug the user about it until they confirm or deny.
|
||||||
if (downloadablelist[i].status != SRCSTAT_PENDING && allowphonehome>=0)
|
if (downloadablelist[i].status != SRCSTAT_PENDING && allowphonehome>=0)
|
||||||
continue;
|
continue;
|
||||||
autoupdate = false;
|
autoupdate = false;
|
||||||
|
@ -2249,7 +2260,7 @@ static void PM_UpdatePackageList(qboolean autoupdate, int retry)
|
||||||
|
|
||||||
if (allowphonehome<=0)
|
if (allowphonehome<=0)
|
||||||
{
|
{
|
||||||
downloadablelist[i].status = SRCSTAT_UNKNOWN;
|
downloadablelist[i].status = SRCSTAT_FAILED;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
downloadablelist[i].curdl = HTTP_CL_Get(va("%s%s"DOWNLOADABLESARGS, downloadablelist[i].url, strchr(downloadablelist[i].url,'?')?"&":"?"), NULL, PM_ListDownloaded);
|
downloadablelist[i].curdl = HTTP_CL_Get(va("%s%s"DOWNLOADABLESARGS, downloadablelist[i].url, strchr(downloadablelist[i].url,'?')?"&":"?"), NULL, PM_ListDownloaded);
|
||||||
|
@ -3851,7 +3862,17 @@ void PM_Command_f(void)
|
||||||
{ //flush package cache, make a new request even if we already got a response from the server.
|
{ //flush package cache, make a new request even if we already got a response from the server.
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < numdownloadablelists; i++)
|
for (i = 0; i < numdownloadablelists; i++)
|
||||||
downloadablelist[i].status = SRCSTAT_PENDING;
|
{
|
||||||
|
switch(downloadablelist[i].status)
|
||||||
|
{
|
||||||
|
case SRCSTAT_DISABLED:
|
||||||
|
case SRCSTAT_UNKNOWN:
|
||||||
|
break; //don't forget the old status for these here.
|
||||||
|
default:
|
||||||
|
downloadablelist[i].status = SRCSTAT_PENDING;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!allowphonehome)
|
if (!allowphonehome)
|
||||||
allowphonehome = -1; //trigger a prompt, instead of ignoring it.
|
allowphonehome = -1; //trigger a prompt, instead of ignoring it.
|
||||||
PM_UpdatePackageList(false, 0);
|
PM_UpdatePackageList(false, 0);
|
||||||
|
|
|
@ -239,7 +239,9 @@ void R_FrameTimeGraph (float frametime, float scale)
|
||||||
} history[NET_TIMINGS];
|
} history[NET_TIMINGS];
|
||||||
static unsigned int findex;
|
static unsigned int findex;
|
||||||
|
|
||||||
|
#ifdef LOADERTHREAD
|
||||||
extern int com_hadwork[WG_COUNT];
|
extern int com_hadwork[WG_COUNT];
|
||||||
|
#endif
|
||||||
|
|
||||||
history[findex&NET_TIMINGSMASK].time = frametime;
|
history[findex&NET_TIMINGSMASK].time = frametime;
|
||||||
history[findex&NET_TIMINGSMASK].col = 0xffffffff;
|
history[findex&NET_TIMINGSMASK].col = 0xffffffff;
|
||||||
|
|
|
@ -5616,10 +5616,12 @@ void QCBUILTIN PF_WriteDouble (pubprogfuncs_t *prinst, struct globalvars_s *pr_g
|
||||||
{
|
{
|
||||||
int dest = G_FLOAT(OFS_PARM0);
|
int dest = G_FLOAT(OFS_PARM0);
|
||||||
double val = G_DOUBLE(OFS_PARM1);
|
double val = G_DOUBLE(OFS_PARM1);
|
||||||
|
#ifdef NETPREPARSE
|
||||||
union {
|
union {
|
||||||
double val;
|
double val;
|
||||||
quint64_t ival;
|
quint64_t ival;
|
||||||
} u = {val};
|
} u = {val};
|
||||||
|
#endif
|
||||||
if (dest == MSG_CSQC)
|
if (dest == MSG_CSQC)
|
||||||
{ //csqc buffers are always written.
|
{ //csqc buffers are always written.
|
||||||
MSG_WriteDouble(&csqcmsgbuffer, val);
|
MSG_WriteDouble(&csqcmsgbuffer, val);
|
||||||
|
|
Loading…
Reference in a new issue