Pass WorldRenderer to IRenderModifiers and replace more palette lookups.

This commit is contained in:
Paul Chote
2013-02-24 12:15:28 +13:00
parent 48d713aafd
commit 000a5eaa56
17 changed files with 40 additions and 32 deletions

View File

@@ -243,7 +243,7 @@ namespace OpenRA.Mods.RA
{
if (manager.self.Owner.Shroud.IsTargetable(unit)) {
var targetCell = unit.Location + (xy - sourceLocation);
foreach (var r in unit.Render())
foreach (var r in unit.Render(wr))
r.Sprite.DrawAt(r.Pos - Traits.Util.CenterOfCell(unit.Location).ToFloat2() + Traits.Util.CenterOfCell(targetCell).ToFloat2(),
r.Palette.RowIndex(wr),
r.Scale*r.Sprite.size);