From 53cb36bbe711dab1b333da7173deae94e46ba5f4 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Fri, 29 Apr 2022 15:48:01 +0200 Subject: [PATCH] Fix wrong quad offset for (not caused by transparent) flushes --- src/game/client/components/maplayers.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index dd6d92f10..a65830f00 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -1410,8 +1410,12 @@ void CMapLayers::RenderQuadLayer(int LayerIndex, CMapItemLayerQuads *pQuadLayer, // render quads of the current offset directly(cancel batching) Graphics()->RenderQuadLayer(Visuals.m_BufferContainerIndex, &s_QuadRenderInfo[0], QuadsRenderCount, CurQuadOffset); QuadsRenderCount = 0; - // since this quad is ignored, the offset is the next quad - CurQuadOffset = i + 1; + CurQuadOffset = i; + if(aColor[3] == 0) + { + // since this quad is ignored, the offset is the next quad + ++CurQuadOffset; + } } if(aColor[3] > 0)