From 2a6af4da696ee8c677f2f50debc4134f9b5ec023 Mon Sep 17 00:00:00 2001 From: cholleme <> Date: Sun, 8 Feb 2004 09:43:01 +0000 Subject: [PATCH] Vertices are in a different structure now --- gl_decals.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gl_decals.c b/gl_decals.c index 3625d05..177e934 100644 --- a/gl_decals.c +++ b/gl_decals.c @@ -323,7 +323,7 @@ void DecalClipLeaf(decal_t *dec, mleaf_t *leaf) { int j; for (j=0; j<3; j++) { - v = (float *)(&globalVertexTable[poly->indecies[i+j]]); + v = (float *)(&cl.worldmodel->userVerts[poly->indecies[i+j]]); newVertex[j][0] = v[0]; newVertex[j][1] = v[1]; newVertex[j][2] = v[2]; @@ -336,7 +336,7 @@ void DecalClipLeaf(decal_t *dec, mleaf_t *leaf) } - //for all surfaces in the leaf + //for all meshes in the leaf for (k=0; knummeshes; k++) { mesh_t *mesh = &cl.worldmodel->meshes[cl.worldmodel->leafmeshes[leaf->firstmesh+k]]; @@ -344,10 +344,10 @@ void DecalClipLeaf(decal_t *dec, mleaf_t *leaf) { int j; - if (DotProduct(dec->normal, mesh->normals[mesh->indecies[i]]) < decalEpsilon) continue; + if (DotProduct(dec->normal, mesh->triplanes[i/3].normal) < decalEpsilon) continue; for (j=0; j<3; j++) { - v = (float *)(&globalVertexTable[mesh->firstvertex+mesh->indecies[i+j]]); + v = (float *)(mesh->userVerts[mesh->indecies[i+j]]); newVertex[j][0] = v[0]; newVertex[j][1] = v[1]; newVertex[j][2] = v[2];