Introduce initial PPos plumbing.
PPos is best thought of as a cell grid applied in screen space. Multiple cells with different terrain heights may be projected to the same PPos, or to multiple PPos if they do not align with the screen grid. PPos coordinates are used primarily for map edge checks and shroud / visibility queries.
This commit is contained in:
@@ -98,8 +98,8 @@ namespace OpenRA.Graphics
|
||||
var cells = restrictToBounds ? viewport.VisibleCellsInsideBounds : viewport.AllVisibleCells;
|
||||
|
||||
// Only draw the rows that are visible.
|
||||
var firstRow = cells.MapCoords.TopLeft.V;
|
||||
var lastRow = Math.Min(cells.MapCoords.BottomRight.V + 1, map.MapSize.Y);
|
||||
var firstRow = cells.CandidateMapCoords.TopLeft.V.Clamp(0, map.MapSize.Y);
|
||||
var lastRow = (cells.CandidateMapCoords.BottomRight.V + 1).Clamp(firstRow, map.MapSize.Y);
|
||||
|
||||
Game.Renderer.Flush();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user