From 4bd44f9d6275f6c9fc0098a598987d7f85d8f221 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Apr 2021 12:58:45 +0200 Subject: [PATCH] - flat sprites use different visibility rules. Hooray, Build engine, yet another totally nonsensical magic factor with absolutely no reason why... --- source/core/rendering/scene/hw_flats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/rendering/scene/hw_flats.cpp b/source/core/rendering/scene/hw_flats.cpp index 2be5262c7..f7d61fd0e 100644 --- a/source/core/rendering/scene/hw_flats.cpp +++ b/source/core/rendering/scene/hw_flats.cpp @@ -366,7 +366,7 @@ void HWFlat::ProcessFlatSprite(HWDrawInfo* di, spritetype* sprite, sectortype* s z = sprite->z * (1 / -256.f); if (z == di->Viewpoint.Pos.Z) return; // looking right at the edge. - visibility = sectorVisibility(§or[sprite->sectnum]);// *(4.f / 5.f); // The factor comes directly from Polymost. No idea why this uses a different visibility setting. Bad projection math? + visibility = sectorVisibility(§or[sprite->sectnum]) *(4.f / 5.f); // The factor comes directly from Polymost. What is it with Build and these magic factors? // Weird Build logic that really makes no sense. if ((sprite->cstat & CSTAT_SPRITE_ONE_SIDED) != 0 && (di->Viewpoint.Pos.Z < z) == ((sprite->cstat & CSTAT_SPRITE_YFLIP) == 0))