Fix r_nocurves in OpenGL2 renderer

Check r_nocurves in surface cull.
While r_nocurves is enabled, don't use merged surfaces because merged curves would be renderer. (note: surface merging is enabled by r_mergeLeafSurfaces)
This commit is contained in:
Zack Middleton 2013-06-20 16:22:40 -05:00
parent 323e8b9921
commit 872465500e

View file

@ -36,6 +36,10 @@ static qboolean R_CullSurface( msurface_t *surf ) {
return qfalse;
}
if ( *surf->data == SF_GRID && r_nocurves->integer ) {
return qtrue;
}
if (surf->cullinfo.type & CULLINFO_PLANE)
{
// Only true for SF_FACE, so treat like its own function
@ -554,7 +558,7 @@ static void R_RecursiveWorldNode( mnode_t *node, int planeBits, int dlightBits,
}
// add merged and unmerged surfaces
if (tr.world->viewSurfaces)
if (tr.world->viewSurfaces && !r_nocurves->integer)
view = tr.world->viewSurfaces + node->firstmarksurface;
else
view = tr.world->marksurfaces + node->firstmarksurface;