mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-21 19:41:14 +00:00
Fix some obscure q3 issues.
This commit is contained in:
parent
dab68fd136
commit
4894a3b77e
4 changed files with 11 additions and 5 deletions
|
@ -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)
|
||||
{
|
||||
if (qrenderer != QR_NONE)
|
||||
S_LocalSound(soundname);
|
||||
S_LocalSound2(soundname, channel, volume);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2037,7 +2037,13 @@ static void GenerateTCMods(const shaderpass_t *pass, int passnum)
|
|||
|
||||
src = tcgen(pass, mesh->numvertexes, texcoordarray[passnum]+mesh->vbofirstvert*2, mesh);
|
||||
//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);
|
||||
for (i = 1; i < pass->numtcmods; i++)
|
||||
|
|
|
@ -400,7 +400,7 @@ qboolean R_DrawSkyChain (batch_t *batch)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (forcedsky->numpasses && !forcedsky->skydome)
|
||||
if (forcedsky->numpasses && !forcedsky->skydome && batch->mesh[0]->xyz_array)
|
||||
{ //cubemap skies!
|
||||
//this is just a simple pass. we use glsl/texgen for any actual work
|
||||
batch_t b = *batch;
|
||||
|
@ -471,7 +471,7 @@ qboolean R_DrawSkyChain (batch_t *batch)
|
|||
else if (batch->meshes)
|
||||
{ //skys are weird.
|
||||
//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);
|
||||
return true; //depth will always be drawn with this pathway... or we were not drawing anything anyway...
|
||||
}
|
||||
|
|
|
@ -1032,7 +1032,7 @@ static qintptr_t CG_SystemCalls(void *offset, quintptr_t mask, qintptr_t fn, con
|
|||
|
||||
case CG_S_STARTLOCALSOUND:
|
||||
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;
|
||||
|
||||
case CG_S_STARTSOUND:// ( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx )
|
||||
|
|
Loading…
Reference in a new issue