+ else if (r_showsurfaces.integer == 3)
+ {
+ float c[4];
+ if(rsurface.texture && rsurface.texture->currentskinframe)
+ memcpy(c, rsurface.texture->currentskinframe->avgcolor, sizeof(c));
+ else
+ {
+ c[0] = 1;
+ c[1] = 0;
+ c[2] = 1;
+ c[3] = 1;
+ }
+
+ if (rsurface.texture->currentskinframe->pants || rsurface.texture->currentskinframe->shirt)
+ {
+ c[0] = rsurface.colormap_pantscolor[0] * 0.3 + rsurface.colormap_shirtcolor[0] * 0.7;
+ c[1] = rsurface.colormap_pantscolor[1] * 0.3 + rsurface.colormap_shirtcolor[1] * 0.7;
+ c[2] = rsurface.colormap_pantscolor[2] * 0.3 + rsurface.colormap_shirtcolor[2] * 0.7;
+ }
+
+ GL_Color(c[0], c[1], c[2], c[3]);
+
+ rsurface.lightmapcolor4f = rsurface.modellightmapcolor4f;
+ rsurface.lightmapcolor4f_bufferobject = rsurface.modellightmapcolor4f_bufferobject;
+ rsurface.lightmapcolor4f_bufferoffset = rsurface.modellightmapcolor4f_bufferoffset;
+
+ if (rsurface.texture->currentmaterialflags & MATERIALFLAG_MODELLIGHT)
+ {
+ r_refdef.lightmapintensity = 1;
+ RSurf_DrawBatch_GL11_VertexShade(texturenumsurfaces, texturesurfacelist, c[0], c[1], c[2], c[3], false, false);
+ r_refdef.lightmapintensity = 0; // we're in showsurfaces, after all
+ }
+ else
+ {
+ GL_Color(c[0], c[1], c[2], c[3]);
+ R_Mesh_ColorPointer(rsurface.lightmapcolor4f, rsurface.lightmapcolor4f_bufferobject, rsurface.lightmapcolor4f_bufferoffset);
+ RSurf_DrawBatch_Simple(texturenumsurfaces, texturesurfacelist);
+ }
+ }
+ else