diff --git a/src/hwrenderer/scene/hw_flats.cpp b/src/hwrenderer/scene/hw_flats.cpp index 3609add57..da2a6e604 100644 --- a/src/hwrenderer/scene/hw_flats.cpp +++ b/src/hwrenderer/scene/hw_flats.cpp @@ -198,6 +198,7 @@ void GLFlat::DrawSubsectors(HWDrawInfo *di, FRenderState &state) else { int index = iboindex; + bool applied = false; for (int i = 0; i < sector->subsectorcount; i++) { subsector_t * sub = sector->subsectors[i]; @@ -205,7 +206,8 @@ void GLFlat::DrawSubsectors(HWDrawInfo *di, FRenderState &state) if (di->ss_renderflags[sub->Index()] & renderflags) { - state.DrawIndexed(DT_Triangles, index, (sub->numlines - 2) * 3, false); + state.DrawIndexed(DT_Triangles, index, (sub->numlines - 2) * 3, !applied); + applied = true; flatvertices += sub->numlines; flatprimitives++; } @@ -285,6 +287,13 @@ void GLFlat::DrawSubsectors(HWDrawInfo *di, FRenderState &state) //========================================================================== void GLFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent) { +#ifdef _DEBUG + if (sector->sectornum == gl_breaksec) + { + int a = 0; + } +#endif + int rel = getExtraLight(); state.SetNormal(plane.plane.Normal().X, plane.plane.Normal().Z, plane.plane.Normal().Y);