Update only dirty radar pixels and refresh every tick.

This commit is contained in:
Paul Chote
2014-12-02 18:29:06 +13:00
parent e064593961
commit 5e402e95cb
2 changed files with 103 additions and 46 deletions

View File

@@ -31,6 +31,23 @@ namespace OpenRA.Traits
readonly CellLayer<short> generatedShroudCount;
readonly CellLayer<bool> explored;
public event Action<CPos> CellEntryChanged
{
add
{
visibleCount.CellEntryChanged += value;
generatedShroudCount.CellEntryChanged += value;
explored.CellEntryChanged += value;
}
remove
{
visibleCount.CellEntryChanged -= value;
generatedShroudCount.CellEntryChanged -= value;
explored.CellEntryChanged -= value;
}
}
readonly Lazy<IFogVisibilityModifier[]> fogVisibilities;
// Cache of visibility that was added, so no matter what crazy trait code does, it