]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix compiler warning
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 2 Jun 2020 14:03:06 +0000 (14:03 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 2 Jun 2020 14:03:06 +0000 (14:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12623 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index be5fea34ba898929c006dd391f7a1847a71f54cf..cd22d2610c05ab395de7720a2764fcd8376bf415 100644 (file)
@@ -8664,6 +8664,9 @@ void RSurf_SetupDepthAndCulling(void)
 static void R_DrawTextureSurfaceList_Sky(int texturenumsurfaces, const msurface_t **texturesurfacelist)
 {
        int j;
+       const float *v;
+       float p[3], mins[3], maxs[3];
+       int scissor[4];
        // transparent sky would be ridiculous
        if (rsurface.texture->currentmaterialflags & MATERIALFLAGMASK_DEPTHSORTED)
                return;
@@ -8676,10 +8679,6 @@ static void R_DrawTextureSurfaceList_Sky(int texturenumsurfaces, const msurface_
        if (r_sky_scissor.integer)
        {
                RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_NOGAPS, texturenumsurfaces, texturesurfacelist);
-               const float *v;
-               float p[3];
-               float mins[3], maxs[3];
-               int scissor[4];
                for (j = 0, v = rsurface.batchvertex3f + 3 * rsurface.batchfirstvertex; j < rsurface.batchnumvertices; j++, v += 3)
                {
                        Matrix4x4_Transform(&rsurface.matrix, v, p);