diff --git a/engine/client/cl_plugin.inc b/engine/client/cl_plugin.inc index c58edfbcc..64fc4fc26 100644 --- a/engine/client/cl_plugin.inc +++ b/engine/client/cl_plugin.inc @@ -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); } diff --git a/engine/gl/gl_backend.c b/engine/gl/gl_backend.c index 876d2ebe3..08b016ba7 100644 --- a/engine/gl/gl_backend.c +++ b/engine/gl/gl_backend.c @@ -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++) diff --git a/engine/gl/gl_warp.c b/engine/gl/gl_warp.c index a4723799b..a77ce18c6 100644 --- a/engine/gl/gl_warp.c +++ b/engine/gl/gl_warp.c @@ -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... } diff --git a/plugins/quake3/clq3_cg.c b/plugins/quake3/clq3_cg.c index ad140c803..625f12c78 100644 --- a/plugins/quake3/clq3_cg.c +++ b/plugins/quake3/clq3_cg.c @@ -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 )