cvar_t r_lightmaprgba = {0, "r_lightmaprgba", "1"};
cvar_t r_vertexsurfacesthreshold = {CVAR_SAVE, "r_vertexsurfacesthreshold", "0"};
cvar_t r_nosurftextures = {0, "r_nosurftextures", "0"};
+cvar_t r_sortsurfaces = {0, "r_sortsurfaces", "0"};
/*
===============
Cvar_RegisterVariable(&r_lightmaprgba);
Cvar_RegisterVariable(&r_vertexsurfacesthreshold);
Cvar_RegisterVariable(&r_nosurftextures);
+ Cvar_RegisterVariable(&r_sortsurfaces);
memset(mod_novis, 0xff, sizeof(mod_novis));
}
for (surfnum = 0;surfnum < sortmodel->nummodelsurfaces;surfnum++)
sortmodel->modelsortedsurfaces[surfnum] = &sortmodel->surfaces[surfnum + sortmodel->firstmodelsurface];
- qsort(sortmodel->modelsortedsurfaces, sortmodel->nummodelsurfaces, sizeof(msurface_t *), Mod_SurfaceQSortCompare);
+ if (r_sortsurfaces.integer)
+ qsort(sortmodel->modelsortedsurfaces, sortmodel->nummodelsurfaces, sizeof(msurface_t *), Mod_SurfaceQSortCompare);
}