mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
Don't use MIN<short> when clamping topclip.
- This was fine with fixed point numbers, since they could never be outside of short range when converted to regular ints. With floating point numbers now, that condition no longer holds.
This commit is contained in:
parent
d6346fb0c6
commit
594b344be9
1 changed files with 4 additions and 4 deletions
|
@ -2097,7 +2097,7 @@ void R_DrawSprite (vissprite_t *spr)
|
|||
{ // seen below floor: clip top
|
||||
if (!spr->bIsVoxel && h > topclip)
|
||||
{
|
||||
topclip = MIN<short> (h, viewheight);
|
||||
topclip = short(MIN(h, viewheight));
|
||||
}
|
||||
hzt = MIN(hzt, hz);
|
||||
}
|
||||
|
@ -2127,7 +2127,7 @@ void R_DrawSprite (vissprite_t *spr)
|
|||
{ // seen in the middle: clip top
|
||||
if (!spr->bIsVoxel && h > topclip)
|
||||
{
|
||||
topclip = MIN<short> (h, viewheight);
|
||||
topclip = MIN(h, viewheight);
|
||||
}
|
||||
hzt = MIN(hzt, hz);
|
||||
}
|
||||
|
@ -2181,7 +2181,7 @@ void R_DrawSprite (vissprite_t *spr)
|
|||
int h = xs_RoundToInt(CenterY - (hz - ViewPos.Z) * scale);
|
||||
if (h > topclip)
|
||||
{
|
||||
topclip = MIN<short>(h, viewheight);
|
||||
topclip = short(MIN(h, viewheight));
|
||||
}
|
||||
}
|
||||
hzt = MIN(hzt, sclipTop);
|
||||
|
@ -2204,7 +2204,7 @@ void R_DrawSprite (vissprite_t *spr)
|
|||
h = (centeryfrac - FixedMul (h-viewz, scale)) >> FRACBITS;
|
||||
if (h > topclip)
|
||||
{
|
||||
topclip = MIN<short> (h, viewheight);
|
||||
topclip = short(MIN(h, viewheight));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue