From 5efc032a4c099843a47469d78a8a0cec1e1d4b41 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 8 Oct 2022 15:19:28 +0200 Subject: [PATCH] - increase angular threshold for aligning wall sprites. With full precision angles the old threshold is simply too low. --- source/core/rendering/scene/hw_walls.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 05669f3f6..8ad0e7844 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -63,7 +63,7 @@ static walltype* IsOnWall(tspritetype* tspr, int height, DVector2& outpos) // Intentionally include two sided walls. Even on them the sprite should be projected onto the wall for better results. auto d = wal.delta(); auto deltaang = absangle(VecToAngle(d), tspr->angle); - const DAngle maxangdelta = DAngle360 / 2048; + const DAngle maxangdelta = DAngle360 / 1024; // angle of the sprite must either be the wall's normal or the negative wall's normal to be aligned. if (deltaang >= DAngle90 - maxangdelta && deltaang <= DAngle90 + maxangdelta)