From: havoc Date: Wed, 30 Sep 2009 10:51:36 +0000 (+0000) Subject: clarify surfedge handling with a comment about surfedge 0 X-Git-Tag: xonotic-v0.1.0preview~1372 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a2d8d24e76cd352000b21a2ff656e264e6b4f934;p=xonotic%2Fdarkplaces.git clarify surfedge handling with a comment about surfedge 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9261 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_brush.c b/model_brush.c index 790a28a7..200fc697 100644 --- a/model_brush.c +++ b/model_brush.c @@ -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);