Update ScreenMap state in a single pass at the end of the tick.

This commit is contained in:
Paul Chote
2017-12-05 17:37:18 +00:00
committed by reaperrr
parent 373aaee004
commit 46f6263061
5 changed files with 82 additions and 18 deletions

View File

@@ -191,7 +191,7 @@ namespace OpenRA
{
ActorMap.AddInfluence(self, ios);
ActorMap.AddPosition(self, ios);
ScreenMap.Add(self);
ScreenMap.AddOrUpdate(self);
}
public void UpdateMaps(Actor self, IOccupySpace ios)
@@ -199,7 +199,7 @@ namespace OpenRA
if (!self.IsInWorld)
return;
ScreenMap.Update(self);
ScreenMap.AddOrUpdate(self);
ActorMap.UpdatePosition(self, ios);
}
@@ -353,6 +353,7 @@ namespace OpenRA
ActorsWithTrait<ITick>().DoTimed(x => x.Trait.Tick(x.Actor), "Trait");
effects.DoTimed(e => e.Tick(this), "Effect");
ScreenMap.Tick();
}
while (frameEndActions.Count != 0)