minor compile fixes.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5672 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2020-04-19 05:11:19 +00:00
parent 81b270db70
commit 843f971e2c
4 changed files with 16 additions and 1 deletions

View file

@ -230,7 +230,9 @@ static qboolean PM_SignatureOkay(package_t *p);
static void PM_FreePackage(package_t *p) static void PM_FreePackage(package_t *p)
{ {
struct packagedep_s *d; struct packagedep_s *d;
#ifdef WEBCLIENT
int i; int i;
#endif
if (p->link) if (p->link)
{ {
@ -4049,8 +4051,10 @@ void QCBUILTIN PF_cl_getpackagemanagerinfo(pubprogfuncs_t *prinst, struct global
RETURN_TSTRING(va("%lu", (unsigned long)p->filesize)); RETURN_TSTRING(va("%lu", (unsigned long)p->filesize));
break; break;
case GPMI_AVAILABLE: case GPMI_AVAILABLE:
#ifdef WEBCLIENT
if (PM_SignatureOkay(p)) if (PM_SignatureOkay(p))
RETURN_TSTRING("1"); RETURN_TSTRING("1");
#endif
break; break;
case GPMI_INSTALLED: case GPMI_INSTALLED:
@ -4060,10 +4064,12 @@ void QCBUILTIN PF_cl_getpackagemanagerinfo(pubprogfuncs_t *prinst, struct global
RETURN_TSTRING("enabled"); //its there (and in use) RETURN_TSTRING("enabled"); //its there (and in use)
else if (p->flags & DPF_PRESENT) else if (p->flags & DPF_PRESENT)
RETURN_TSTRING("present"); //its there (but ignored) RETURN_TSTRING("present"); //its there (but ignored)
#ifdef WEBCLIENT
else if (p->download) else if (p->download)
RETURN_TSTRING(va("%i%%", (int)p->download->qdownload.percent)); //we're downloading it. RETURN_TSTRING(va("%i%%", (int)p->download->qdownload.percent)); //we're downloading it.
else if (p->trymirrors) else if (p->trymirrors)
RETURN_TSTRING("pending"); //its queued. RETURN_TSTRING("pending"); //its queued.
#endif
break; break;
case GPMI_GAMEDIR: case GPMI_GAMEDIR:
RETURN_TSTRING(p->gamedir); RETURN_TSTRING(p->gamedir);

View file

@ -34,6 +34,7 @@ We also have no doppler with WebAudio.
#define OPENAL_STATIC //our javascript port doesn't support dynamic linking (bss+data segments get too messy). #define OPENAL_STATIC //our javascript port doesn't support dynamic linking (bss+data segments get too messy).
#define SDRVNAME "WebAudio" //IE doesn't support webaudio, resulting in noticable error messages about no openal, which is technically incorrect. So lets be clear about this. #define SDRVNAME "WebAudio" //IE doesn't support webaudio, resulting in noticable error messages about no openal, which is technically incorrect. So lets be clear about this.
#define SDRVNAMEDESC "WebAudio:" #define SDRVNAMEDESC "WebAudio:"
qboolean firefoxstaticsounds; //FireFox bugs out with static sounds. they all end up full volume AND THIS IS REALLY LOUD AND REALLY ANNOYING.
#else #else
#define SDRVNAME "OpenAL" #define SDRVNAME "OpenAL"
#define SDRVNAMEDESC "OAL:" #define SDRVNAMEDESC "OAL:"

View file

@ -5533,7 +5533,6 @@ void GLBE_UpdateLightmaps(void)
{ {
extern cvar_t r_lightmap_nearest; extern cvar_t r_lightmap_nearest;
TEXASSIGN(lm->lightmap_texture, Image_CreateTexture(va("***lightmap %i***", lmidx), NULL, (r_lightmap_nearest.ival?IF_NEAREST:IF_LINEAR)|IF_NOMIPMAP)); TEXASSIGN(lm->lightmap_texture, Image_CreateTexture(va("***lightmap %i***", lmidx), NULL, (r_lightmap_nearest.ival?IF_NEAREST:IF_LINEAR)|IF_NOMIPMAP));
lm->lightmap_texture->format = lm->fmt;
qglGenTextures(1, &lm->lightmap_texture->num); qglGenTextures(1, &lm->lightmap_texture->num);
GL_MTBind(0, GL_TEXTURE_2D, lm->lightmap_texture); GL_MTBind(0, GL_TEXTURE_2D, lm->lightmap_texture);
qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
@ -5560,6 +5559,13 @@ void GLBE_UpdateLightmaps(void)
qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, gl_config.formatinfo[lm->fmt].swizzle_b); qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, gl_config.formatinfo[lm->fmt].swizzle_b);
qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, gl_config.formatinfo[lm->fmt].swizzle_a); qglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, gl_config.formatinfo[lm->fmt].swizzle_a);
} }
//for completeness.
lm->lightmap_texture->format = lm->fmt;
lm->lightmap_texture->width = lm->width;
lm->lightmap_texture->height = lm->height;
lm->lightmap_texture->depth = 1;
lm->lightmap_texture->status = TEX_LOADED;
} }
else else
{ {

View file

@ -2620,6 +2620,7 @@ void SV_DoDirectConnect(svconnectinfo_t *fte_restrict info)
if (!newcl) //client has no slot. It's possible to bipass this if server is loading a game. (or a duplicated qsocket) if (!newcl) //client has no slot. It's possible to bipass this if server is loading a game. (or a duplicated qsocket)
{ {
#ifdef SUBSERVERS
if (SSV_IsSubServer()) if (SSV_IsSubServer())
{ {
if (1) if (1)
@ -2646,6 +2647,7 @@ void SV_DoDirectConnect(svconnectinfo_t *fte_restrict info)
return; return;
} }
} }
#endif
/*single player logic*/ /*single player logic*/
if (sv.allocated_client_slots == 1 && info->adr.type == NA_LOOPBACK) if (sv.allocated_client_slots == 1 && info->adr.type == NA_LOOPBACK)