mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-16 17:01:44 +00:00
enable WEBCLIENT in dedicated servers.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4875 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
26402942f8
commit
d6bf654215
7 changed files with 20 additions and 8 deletions
|
@ -704,7 +704,7 @@ BOTLIB_OBJS = \
|
|||
l_struct.o
|
||||
|
||||
#the defaults for sdl come first
|
||||
#CC_MACHINE:=$(shell TESTamch $(CC) -dumpmachine)
|
||||
#CC_MACHINE:=$(shell $(CC) -dumpmachine)
|
||||
ifeq ($(FTE_TARGET),SDL2)
|
||||
SDLCONFIG?=sdl2-config
|
||||
FTE_FULLTARGET?=sdl2$(BITS)
|
||||
|
@ -834,7 +834,7 @@ ifeq (win_SDL,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
|
|||
|
||||
EXEPOSTFIX=.exe
|
||||
|
||||
CC_MACHINE:=$(shell TESTaseh $(CC) -dumpmachine)
|
||||
CC_MACHINE:=$(shell $(CC) -dumpmachine)
|
||||
ARCH_PREDEP=$(BASE_DIR)/libs/SDL2-2.0.1/$(CC_MACHINE)/bin/sdl2-config
|
||||
SDLCONFIG=$(ARCH_PREDEP) --prefix=$(BASE_DIR)/libs/SDL2-2.0.1/$(CC_MACHINE)
|
||||
ARCH_CFLAGS=`$(SDLCONFIG) --cflags`
|
||||
|
|
|
@ -3984,7 +3984,7 @@ typedef struct {
|
|||
char fname[1]; //system path or url.
|
||||
} hrf_t;
|
||||
|
||||
int waitingformanifest;
|
||||
extern int waitingformanifest;
|
||||
void Host_DoRunFile(hrf_t *f);
|
||||
void CL_PlayDemoStream(vfsfile_t *file, struct dl_download *, char *filename, qboolean issyspath, int demotype, float bufferdelay);
|
||||
void CL_ParseQTVDescriptor(vfsfile_t *f, const char *name);
|
||||
|
|
|
@ -417,7 +417,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#undef HALFLIFEMODELS
|
||||
#undef VM_UI
|
||||
#undef VM_CG
|
||||
#undef WEBCLIENT
|
||||
#undef TEXTEDITOR
|
||||
#undef RUNTIMELIGHTING
|
||||
#undef DSPMODELS
|
||||
|
|
|
@ -17,7 +17,7 @@ hashtable_t filesystemhash;
|
|||
qboolean com_fschanged = true;
|
||||
qboolean com_installer = false;
|
||||
qboolean fs_readonly;
|
||||
extern int waitingformanifest;
|
||||
int waitingformanifest;
|
||||
static unsigned int fs_restarts;
|
||||
void *fs_thread_mutex;
|
||||
|
||||
|
|
|
@ -35,7 +35,9 @@ void PF_Common_RegisterCvars(void)
|
|||
Cvar_Register (&pr_brokenfloatconvert, cvargroup_progs);
|
||||
Cvar_Register (&pr_tempstringcount, cvargroup_progs);
|
||||
Cvar_Register (&pr_tempstringsize, cvargroup_progs);
|
||||
#ifdef WEBCLIENT
|
||||
Cvar_Register (&pr_enable_uriget, cvargroup_progs);
|
||||
#endif
|
||||
Cvar_Register (&pr_enable_profiling, cvargroup_progs);
|
||||
Cvar_Register (&pr_sourcedir, cvargroup_progs);
|
||||
|
||||
|
@ -3960,7 +3962,10 @@ static void PR_uri_get_callback(struct dl_download *dl)
|
|||
//float(string uril, float id) uri_get = #513;
|
||||
void QCBUILTIN PF_uri_get (pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
#ifdef WEBCLIENT
|
||||
#ifndef WEBCLIENT
|
||||
Con_Printf("uri_get is not implemented in this build\n");
|
||||
G_FLOAT(OFS_RETURN) = 0;
|
||||
#else
|
||||
world_t *w = prinst->parms->user;
|
||||
struct dl_download *dl;
|
||||
|
||||
|
@ -4010,8 +4015,8 @@ void QCBUILTIN PF_uri_get (pubprogfuncs_t *prinst, struct globalvars_s *pr_glob
|
|||
G_FLOAT(OFS_RETURN) = 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
G_FLOAT(OFS_RETURN) = 0;
|
||||
#endif
|
||||
}
|
||||
void QCBUILTIN PF_netaddress_resolve(pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
|
@ -5719,8 +5724,10 @@ lh_extension_t QSG_Extensions[] = {
|
|||
{"DP_QC_TRACE_MOVETYPES"}, //this one is just a lame excuse to add annother extension...
|
||||
{"DP_QC_UNLIMITEDTEMPSTRINGS", 0, NULL, {NULL}, "Supersedes DP_QC_MULTIPLETEMPSTRINGS, superseded by FTE_QC_PERSISTENTTEMPSTRINGS. All temp strings will be valid at least until the QCVM returns."},
|
||||
{"DP_QC_URI_ESCAPE", 2, NULL, {"uri_escape", "uri_unescape"}},
|
||||
#ifdef WEBCLIENT
|
||||
{"DP_QC_URI_GET", 1, NULL, {"uri_get"}},
|
||||
{"DP_QC_URI_POST", 1, NULL, {"uri_get"}},
|
||||
#endif
|
||||
{"DP_QC_VECTOANGLES_WITH_ROLL"},
|
||||
{"DP_QC_VECTORVECTORS", 1, NULL, {"vectorvectors"}},
|
||||
{"DP_QC_WHICHPACK", 1, NULL, {"whichpack"}},
|
||||
|
|
|
@ -1186,7 +1186,7 @@ struct dl_download *DL_Create(const char *url)
|
|||
/*destroys an entire download context*/
|
||||
void DL_Close(struct dl_download *dl)
|
||||
{
|
||||
#ifndef NPFTE
|
||||
#if !defined(NPFTE) && !defined(SERVERONLY)
|
||||
if (cls.download == &dl->qdownload)
|
||||
cls.download = NULL;
|
||||
#endif
|
||||
|
@ -1225,6 +1225,7 @@ struct dl_download *HTTP_CL_Get(const char *url, const char *localfile, void (*N
|
|||
activedownloads = newdl;
|
||||
|
||||
|
||||
#ifndef SERVERONLY
|
||||
if (!cls.download && localfile && !newdl->isquery)
|
||||
{
|
||||
cls.download = &newdl->qdownload;
|
||||
|
@ -1236,6 +1237,7 @@ struct dl_download *HTTP_CL_Get(const char *url, const char *localfile, void (*N
|
|||
Q_strncpyz(newdl->qdownload.remotename, newdl->url, sizeof(newdl->qdownload.remotename));
|
||||
newdl->qdownload.starttime = Sys_DoubleTime();
|
||||
}
|
||||
#endif
|
||||
|
||||
return newdl;
|
||||
}
|
||||
|
@ -1287,6 +1289,7 @@ void HTTP_CL_Think(void)
|
|||
}
|
||||
link = &dl->next;
|
||||
|
||||
#ifndef SERVERONLY
|
||||
if (!cls.download && !dl->isquery)
|
||||
{
|
||||
cls.download = &dl->qdownload;
|
||||
|
@ -1318,6 +1321,7 @@ void HTTP_CL_Think(void)
|
|||
dl->qdownload.rate = (dl->qdownload.completedbytes - dl->qdownload.ratebytes) / 1;
|
||||
dl->qdownload.ratebytes = dl->qdownload.completedbytes;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -105,7 +105,9 @@ struct dl_download
|
|||
void *user_ctx;
|
||||
qboolean isquery; //will not be displayed in the download/progress bar stuff.
|
||||
|
||||
#ifndef SERVERONLY
|
||||
qdownload_t qdownload;
|
||||
#endif
|
||||
|
||||
/*stream config*/
|
||||
char *url; /*original url*/
|
||||
|
|
Loading…
Reference in a new issue