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

@@ -82,7 +82,9 @@ namespace OpenRA.Mods.RA.Orders
else
{
foreach (var r in Preview)
r.Sprite.DrawAt(wr,Game.CellSize*topLeft + r.Pos, r.Palette ?? world.LocalPlayer.Palette);
r.Sprite.DrawAt(Game.CellSize*topLeft + r.Pos,
wr.GetPaletteIndex(r.Palette ?? world.LocalPlayer.Palette),
r.Scale*r.Sprite.size);
var res = world.WorldActor.Trait<ResourceLayer>();
var isCloseEnough = BuildingInfo.IsCloseEnoughToBase(world, world.LocalPlayer, Building, topLeft);