Bug: GetUnitsInRectAll() doesn't pick bottommost units

The natives picking all units in a rect (GetUnitsInRectAll(), GetUnitsInRectMatching(), etc.) are bugged: They don’t pick units located in the bottom 32 Y-coordinate-range.

For instance, when you create a rect ranging from Y = 0 to Y = 256, the natives will only pick units located between Y = 32 and Y = 256.

This has been the case at least since patch 1.32, maybe longer.

1 Like

Nor does it pick units in the leftmost cells.

And there is another off-by-one error: When you add a rect to a region, it adds one extra row and column of cells at the right and the top. Since lots of maps use the TriggerRegisterEnterRegion and TriggerTriggerLeaveRegion events with regions made from rects, lots of maps are rendered inaccurate there.

1 Like