From 172e3996bbdbfc12f9bbf81ebf769edc22751e57 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 5 Apr 2021 19:37:00 +1000 Subject: [PATCH] - `HWSprite::Process()`: Added x-off-by-one-fix for sprites similar to yspans from b7bad558da22dc14c5b5424208eaa4efe470dcaa. --- source/core/rendering/scene/hw_sprites.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/core/rendering/scene/hw_sprites.cpp b/source/core/rendering/scene/hw_sprites.cpp index c3a7032c2..4fe85f31f 100644 --- a/source/core/rendering/scene/hw_sprites.cpp +++ b/source/core/rendering/scene/hw_sprites.cpp @@ -405,6 +405,8 @@ void HWSprite::Process(HWDrawInfo* di, spritetype* spr, sectortype* sector, int float xoff = (tilexoff * spr->xrepeat) * (0.2f / 16.f); float yoff = (tileyoff * spr->yrepeat) * (0.25f / 16.f); + if (xsize & 1) xoff -= spr->xrepeat * (0.1f / 16.f); // Odd xspans (taken from polymost as-is) + if (spr->cstat & CSTAT_SPRITE_YCENTER) { yoff -= height * 0.5;