1
0
Fork 0
forked from fte/fteqw

Fix some obscure q3 issues.

This commit is contained in:
Shpoike 2023-06-26 01:54:59 +01:00
parent dab68fd136
commit 4894a3b77e
4 changed files with 11 additions and 5 deletions

View file

@ -536,7 +536,7 @@ static void Plug_Scene_RenderScene(plugrefdef_t *in, size_t areabytes, const qby
static void QDECL Plug_LocalSound(const char *soundname, int channel, float volume) static void QDECL Plug_LocalSound(const char *soundname, int channel, float volume)
{ {
if (qrenderer != QR_NONE) if (qrenderer != QR_NONE)
S_LocalSound(soundname); S_LocalSound2(soundname, channel, volume);
} }

View file

@ -2037,7 +2037,13 @@ static void GenerateTCMods(const shaderpass_t *pass, int passnum)
src = tcgen(pass, mesh->numvertexes, texcoordarray[passnum]+mesh->vbofirstvert*2, mesh); src = tcgen(pass, mesh->numvertexes, texcoordarray[passnum]+mesh->vbofirstvert*2, mesh);
//tcgen might return unmodified info //tcgen might return unmodified info
if (pass->numtcmods) if (!src)
{ //don't crash... not much else we can do.
shaderstate.pendingtexcoordparts[passnum] = 2;
shaderstate.pendingtexcoordvbo[passnum] = shaderstate.sourcevbo->texcoord.gl.vbo;
shaderstate.pendingtexcoordpointer[passnum] = shaderstate.sourcevbo->texcoord.gl.addr;
}
else if (pass->numtcmods)
{ {
tcmod(&pass->tcmods[0], mesh->numvertexes, src, texcoordarray[passnum]+mesh->vbofirstvert*2, mesh); tcmod(&pass->tcmods[0], mesh->numvertexes, src, texcoordarray[passnum]+mesh->vbofirstvert*2, mesh);
for (i = 1; i < pass->numtcmods; i++) for (i = 1; i < pass->numtcmods; i++)

View file

@ -400,7 +400,7 @@ qboolean R_DrawSkyChain (batch_t *batch)
return true; return true;
} }
if (forcedsky->numpasses && !forcedsky->skydome) if (forcedsky->numpasses && !forcedsky->skydome && batch->mesh[0]->xyz_array)
{ //cubemap skies! { //cubemap skies!
//this is just a simple pass. we use glsl/texgen for any actual work //this is just a simple pass. we use glsl/texgen for any actual work
batch_t b = *batch; batch_t b = *batch;
@ -471,7 +471,7 @@ qboolean R_DrawSkyChain (batch_t *batch)
else if (batch->meshes) else if (batch->meshes)
{ //skys are weird. { //skys are weird.
//they're the one type of surface with implicit nodraw when there's no passes. //they're the one type of surface with implicit nodraw when there's no passes.
if (batch->shader->skydome || batch->shader->numpasses) if ((skyboxtex&&*skyboxtex) || batch->shader->numpasses)
R_DrawFastSky(batch); R_DrawFastSky(batch);
return true; //depth will always be drawn with this pathway... or we were not drawing anything anyway... return true; //depth will always be drawn with this pathway... or we were not drawing anything anyway...
} }

View file

@ -1032,7 +1032,7 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
case CG_S_STARTLOCALSOUND: case CG_S_STARTLOCALSOUND:
if (VM_LONG(arg[0]) != -1 && arg[0]) if (VM_LONG(arg[0]) != -1 && arg[0])
audiofuncs->LocalSound(VM_FROMSTRCACHE(arg[0]), CHAN_AUTO, 1.0); audiofuncs->LocalSound(VM_FROMSTRCACHE(arg[0]), VM_LONG(arg[1]), 1.0);
break; break;
case CG_S_STARTSOUND:// ( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx ) case CG_S_STARTSOUND:// ( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx )