- flat sprites use different visibility rules.

Hooray, Build engine, yet another totally nonsensical magic factor with absolutely no reason why...
This commit is contained in:
Christoph Oelckers 2021-04-07 12:58:45 +02:00
parent 6ad0089524
commit 4bd44f9d62

View file

@ -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(&sector[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(&sector[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))