Unify the player dictionaries in FrozenUnderFog.

This improves the performance of FrozenUnderFog.Tick as only one lookup needs to be done rather than two.
This commit is contained in:
RoosterDragon
2015-08-06 23:28:08 +01:00
parent e74c0d6c13
commit 592004e738
2 changed files with 27 additions and 15 deletions

View File

@@ -41,13 +41,14 @@ namespace OpenRA.Traits
public DamageState DamageState;
public bool Visible = true;
public bool NeedRenderables;
public bool NeedRenderables { get; private set; }
public bool IsRendering { get; private set; }
public FrozenActor(Actor self, PPos[] footprint, Shroud shroud)
public FrozenActor(Actor self, PPos[] footprint, Shroud shroud, bool startsRevealed)
{
actor = self;
this.shroud = shroud;
NeedRenderables = startsRevealed;
removeFrozenActors = self.TraitsImplementing<IRemoveFrozenActor>().ToArray();
// Consider all cells inside the map area (ignoring the current map bounds)