Cache ProjectedCellBounds during load time

This commit is contained in:
abcdefg30
2020-05-22 13:47:35 +02:00
committed by teinarss
parent 173aae1f81
commit 889e2152a4
5 changed files with 12 additions and 11 deletions

View File

@@ -271,7 +271,7 @@ namespace OpenRA.Mods.Common.Traits
UpdateShroud(new ProjectedCellRegion(map, tl, br));
}
void UpdateShroud(ProjectedCellRegion region)
void UpdateShroud(IEnumerable<PPos> region)
{
foreach (var puv in region)
{
@@ -299,7 +299,7 @@ namespace OpenRA.Mods.Common.Traits
void IRenderShroud.RenderShroud(WorldRenderer wr)
{
UpdateShroud(map.ProjectedCellBounds);
UpdateShroud(map.ProjectedCells);
fogLayer.Draw(wr.Viewport);
shroudLayer.Draw(wr.Viewport);
}