Spike's Direct3D crash fix for quake1 maps that have a skybox at the map's starting spawn location

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3830 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2011-06-22 13:58:35 +00:00
parent 75ca1c85ea
commit 803faf2cfc

View file

@ -1614,6 +1614,13 @@ static void BE_DrawMeshChain_Internal(void)
switch (shaderstate.mode)
{
case BEM_DEPTHONLY:
shaderstate.lastpasscount = 0;
i = 0;
if (i != shaderstate.curvertdecl)
{
shaderstate.curvertdecl = i;
d3dcheck(IDirect3DDevice9_SetVertexDeclaration(pD3DDev9, vertexdecls[shaderstate.curvertdecl]));
}
IDirect3DDevice9_SetRenderState(pD3DDev9, D3DRS_COLORWRITEENABLE, 0);
/*deactivate any extras*/
for (passno = 0; passno < shaderstate.lastpasscount; )