Scale is now set via a field on Render* and interacts properly with chronoshift and building previews.

This commit is contained in:
Paul Chote
2010-11-27 13:30:08 +13:00
parent 840ade5b78
commit 00a0aac7a3
10 changed files with 25 additions and 76 deletions

View File

@@ -214,8 +214,9 @@ namespace OpenRA.Mods.RA
{
var targetCell = unit.Location + xy - sourceLocation;
foreach (var r in unit.Render())
r.Sprite.DrawAt(wr, r.Pos - Traits.Util.CenterOfCell(unit.Location) + Traits.Util.CenterOfCell(targetCell),
r.Palette ?? unit.Owner.Palette);
r.Sprite.DrawAt(r.Pos - Traits.Util.CenterOfCell(unit.Location) + Traits.Util.CenterOfCell(targetCell),
wr.GetPaletteIndex(r.Palette ?? unit.Owner.Palette),
r.Scale*r.Sprite.size);
}
// Unit tiles