From 544f9cd148db2d56b035bc324b707814c2c51e5e Mon Sep 17 00:00:00 2001 From: "divverent divverent@d7cf8633-e32d-0410-b094-e92efae38249" <> Date: Fri, 24 Sep 2010 11:11:11 +0000 Subject: [PATCH] UNMERGE remove more unused code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10488 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::unmerge=88f0fcbd983dae9880e48b6bc457eabd9bd7017d --- gl_rmain.c | 6 ++++++ gl_rsurf.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gl_rmain.c b/gl_rmain.c index 4f3aeade..5a072b2a 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -8383,8 +8383,12 @@ void R_Water_AddWaterPlane(msurface_t *surface, int entno) vec3_t normal; vec3_t center; mplane_t plane; + int cam_ent; r_waterstate_waterplane_t *p; texture_t *t = R_GetCurrentTexture(surface->texture); + cam_ent = t->camera_entity; + if(!(t->currentmaterialflags & MATERIALFLAG_CAMERA)) + cam_ent = 0; // just use the first triangle with a valid normal for any decisions VectorClear(normal); @@ -11053,6 +11057,7 @@ void RSurf_PrepareVerticesForBatch(int batchneed, int texturenumsurfaces, const int surfacefirstvertex; int surfaceendvertex; int surfacenumvertices; + int surfaceadjustvertex; int needsupdate; int i, j; qboolean gaps; @@ -11382,6 +11387,7 @@ void RSurf_PrepareVerticesForBatch(int batchneed, int texturenumsurfaces, const surfacefirstvertex = texturesurfacelist[i]->num_firstvertex; surfacenumvertices = texturesurfacelist[i]->num_vertices; surfacefirsttriangle = texturesurfacelist[i]->num_firsttriangle; + surfaceadjustvertex = numvertices - surfacefirstvertex; surfacenumtriangles = texturesurfacelist[i]->num_triangles; // copy only the data requested if ((batchneed & BATCHNEED_VERTEXPOSITION) && rsurface.modelvertexposition) diff --git a/gl_rsurf.c b/gl_rsurf.c index 44e45544..bd084c16 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1199,8 +1199,10 @@ void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surface const msurface_t *surface; int i, k, kend, l, endsurface, batchnumsurfaces, texturenumsurfaces; const msurface_t **texturesurfacelist; + const int *element3i; texture_t *tex; CHECKGLERROR + element3i = rsurface.modelelement3i; // this is a double loop because non-visible surface skipping has to be // fast, and even if this is not the world model (and hence no visibility // checking) the input surface list and batch buffer are different formats -- 2.39.2