mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- fixed side check for sloped sprites.
This commit is contained in:
parent
1294f10cd7
commit
fcb3e43799
1 changed files with 7 additions and 2 deletions
|
@ -406,8 +406,13 @@ void HWFlat::ProcessFlatSprite(HWDrawInfo* di, tspritetype* sprite, sectortype*
|
|||
visibility = sectorVisibility(sector) *(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_SIDE) != 0 && (di->Viewpoint.Pos.Z < z) == ((sprite->cstat & CSTAT_SPRITE_YFLIP) == 0))
|
||||
return;
|
||||
if ((sprite->cstat & CSTAT_SPRITE_ONE_SIDE) != 0)
|
||||
{
|
||||
double myz = !(sprite->clipdist & TSPR_SLOPESPRITE) ? z :
|
||||
tspriteGetZOfSlope(sprite, int(di->Viewpoint.Pos.X * 16), int(di->Viewpoint.Pos.Y * -16)) * -(1. / 256.);
|
||||
if ((di->Viewpoint.Pos.Z < myz) == ((sprite->cstat & CSTAT_SPRITE_YFLIP) == 0))
|
||||
return;
|
||||
}
|
||||
|
||||
if (texture && texture->isValid())
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue