We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baed809 commit 173aae1Copy full SHA for 173aae1
OpenRA.Game/Map/Map.cs
@@ -810,8 +810,9 @@ public bool Contains(MPos uv)
810
811
bool ContainsAllProjectedCellsCovering(MPos uv)
812
{
813
+ // PERF: Checking the bounds directly here is the same as calling Contains((PPos)uv) but saves an allocation
814
if (Grid.MaximumTerrainHeight == 0)
- return Contains((PPos)uv);
815
+ return Bounds.Contains(uv.U, uv.V);
816
817
// If the cell has no valid projection, then we're off the map.
818
var projectedCells = ProjectedCellsCovering(uv);
0 commit comments