Merge pull request #11348 from reaperrr/clean-effects

Remove redundant Effects
This commit is contained in:
reaperrr
2016-05-26 07:52:12 +02:00
17 changed files with 18 additions and 155 deletions

View File

@@ -10,7 +10,7 @@
#endregion
using System.Collections.Generic;
using OpenRA.Effects;
using OpenRA.Mods.Common.Effects;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits.Render

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Traits.Render
void SpawnExplosions(World world, IEnumerable<CPos> cells)
{
foreach (var c in cells)
world.AddFrameEndTask(w => w.Add(new Explosion(w, w.Map.CenterOfCell(c), info.Image, info.Sequences.Random(w.SharedRandom), info.Palette)));
world.AddFrameEndTask(w => w.Add(new SpriteEffect(w.Map.CenterOfCell(c), w, info.Image, info.Sequences.Random(w.SharedRandom), info.Palette)));
}
}
}

View File

@@ -108,7 +108,7 @@ namespace OpenRA.Mods.Common.Traits.Render
public void SpawnDeathAnimation(Actor self, WPos pos, string image, string sequence, string palette)
{
self.World.AddFrameEndTask(w => w.Add(new Corpse(w, pos, image, sequence, palette)));
self.World.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, w, image, sequence, palette)));
}
void INotifyCrushed.OnCrush(Actor self, Actor crusher, HashSet<string> crushClasses)