Merge pull request #4303 from pchote/batch-fix

Fix two serious perf regressions.
This commit is contained in:
Matthias Mailänder
2013-12-13 05:54:06 -08:00
4 changed files with 29 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ namespace OpenRA.Mods.RA.Effects
{
WPos pos;
ContrailRenderable trail;
int ticks;
public ContrailFader(WPos pos, ContrailRenderable trail)
{
@@ -27,6 +28,9 @@ namespace OpenRA.Mods.RA.Effects
public void Tick(World world)
{
if (ticks++ == trail.Length)
world.AddFrameEndTask(w => w.Remove(this));
trail.Update(pos);
}