mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
Clamp segment range
This commit is contained in:
parent
5f1b822523
commit
3b397183ac
1 changed files with 6 additions and 0 deletions
|
@ -102,6 +102,9 @@ void PolyCull::ClearSolidSegments()
|
|||
|
||||
bool PolyCull::IsSegmentCulled(int x1, int x2) const
|
||||
{
|
||||
x1 = clamp(x1, -0x7ffe, 0x7ffd);
|
||||
x2 = clamp(x2, -0x7ffd, 0x7ffe);
|
||||
|
||||
int next = 0;
|
||||
while (SolidSegments[next].X2 <= x2)
|
||||
next++;
|
||||
|
@ -113,6 +116,9 @@ void PolyCull::MarkSegmentCulled(int x1, int x2)
|
|||
if (x1 >= x2)
|
||||
return;
|
||||
|
||||
x1 = clamp(x1, -0x7ffe, 0x7ffd);
|
||||
x2 = clamp(x2, -0x7ffd, 0x7ffe);
|
||||
|
||||
int cur = 1;
|
||||
while (true)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue