]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
clarify surfedge handling with a comment about surfedge 0
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 30 Sep 2009 10:51:36 +0000 (10:51 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 30 Sep 2009 10:51:36 +0000 (10:51 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9261 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 790a28a7623fcaf0b33994613ee396cba2e45ab3..200fc697dbf132f17f822c315f696af52db12a3b 100644 (file)
@@ -2328,7 +2328,8 @@ static void Mod_Q1BSP_LoadFaces(lump_t *l)
                {
                        int lindex = loadmodel->brushq1.surfedges[firstedge + i];
                        float s, t;
-                       if (lindex > 0)
+                       // note: the q1bsp format does not allow a 0 surfedge (it would have no negative counterpart)
+                       if (lindex >= 0)
                                VectorCopy(loadmodel->brushq1.vertexes[loadmodel->brushq1.edges[lindex].v[0]].position, (loadmodel->surfmesh.data_vertex3f + 3 * surface->num_firstvertex) + i * 3);
                        else
                                VectorCopy(loadmodel->brushq1.vertexes[loadmodel->brushq1.edges[-lindex].v[1]].position, (loadmodel->surfmesh.data_vertex3f + 3 * surface->num_firstvertex) + i * 3);