diff --git a/src/r_poly.cpp b/src/r_poly.cpp index 6542afcfb8..bd9003fab3 100644 --- a/src/r_poly.cpp +++ b/src/r_poly.cpp @@ -67,6 +67,7 @@ void RenderPolyBsp::Render() RenderSubsector(*it); RenderPlayerSprites(); + DrawerCommandQueue::WaitForWorkers(); RenderScreenSprites(); // To do: should be called by FSoftwareRenderer::DrawRemainingPlayerSprites instead of here } diff --git a/src/r_poly_triangle.cpp b/src/r_poly_triangle.cpp index 73c33d0243..d446485510 100644 --- a/src/r_poly_triangle.cpp +++ b/src/r_poly_triangle.cpp @@ -425,7 +425,7 @@ void ScreenPolyTriangleDrawer::draw(const ScreenPolyTriangleDrawerArgs *args, Dr for (int ix = x; ix < x + q; ix++) { - bool visible = ix >= clipleft && ix <= clipright && (cliptop <= y + iy) && (clipbottom > y + iy); + bool visible = ix >= clipleft && ix < clipright && (cliptop <= y + iy) && (clipbottom > y + iy); if (CX1 > 0 && CX2 > 0 && CX3 > 0 && visible) { @@ -594,7 +594,7 @@ void ScreenPolyTriangleDrawer::fill(const ScreenPolyTriangleDrawerArgs *args, Dr for (int ix = x; ix < x + q; ix++) { - bool visible = ix >= clipleft && ix <= clipright && (cliptop <= y + iy) && (clipbottom > y + iy); + bool visible = ix >= clipleft && ix < clipright && (cliptop <= y + iy) && (clipbottom > y + iy); if (CX1 > 0 && CX2 > 0 && CX3 > 0 && visible) { @@ -819,7 +819,7 @@ void ScreenPolyTriangleDrawer::draw32(const ScreenPolyTriangleDrawerArgs *args, for (int ix = x; ix < x + q; ix++) { - bool visible = ix >= clipleft && ix <= clipright && (cliptop <= y + iy) && (clipbottom > y + iy); + bool visible = ix >= clipleft && ix < clipright && (cliptop <= y + iy) && (clipbottom > y + iy); if (CX1 > 0 && CX2 > 0 && CX3 > 0 && visible) { @@ -995,7 +995,7 @@ void ScreenPolyTriangleDrawer::fill32(const ScreenPolyTriangleDrawerArgs *args, for (int ix = x; ix < x + q; ix++) { - bool visible = ix >= clipleft && ix <= clipright && (cliptop <= y + iy) && (clipbottom > y + iy); + bool visible = ix >= clipleft && ix < clipright && (cliptop <= y + iy) && (clipbottom > y + iy); if (CX1 > 0 && CX2 > 0 && CX3 > 0 && visible) {