ScreenMap should TickRender, rather than just Tick.
This is as FrozenUnderFog.TickRender queues an update to the screen map. If this is not processed in the same tick, this results in screen bounds for the frozen actor being 1 tick behind. By making ScreenMap TickRender, it ensures changes from both Tick and TickRender traits are processed, rather than just Tick traits.
This commit is contained in:
@@ -245,7 +245,7 @@ namespace OpenRA.Traits
|
||||
return rect;
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
public void TickRender()
|
||||
{
|
||||
foreach (var a in addOrUpdateActors)
|
||||
{
|
||||
|
||||
@@ -353,7 +353,6 @@ 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)
|
||||
@@ -364,6 +363,7 @@ namespace OpenRA
|
||||
public void TickRender(WorldRenderer wr)
|
||||
{
|
||||
ActorsWithTrait<ITickRender>().DoTimed(x => x.Trait.TickRender(wr, x.Actor), "Render");
|
||||
ScreenMap.TickRender();
|
||||
}
|
||||
|
||||
public IEnumerable<Actor> Actors { get { return actors.Values; } }
|
||||
|
||||
Reference in New Issue
Block a user