Allow sequences to define a Scale factor.
This commit is contained in:
@@ -280,7 +280,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
{
|
||||
return anims.Where(b => b.IsVisible
|
||||
&& b.Animation.Animation.CurrentSequence != null)
|
||||
.Select(a => (a.Animation.Animation.Image.Size.XY * Info.Scale).ToInt2())
|
||||
.Select(a => (a.Animation.Animation.Image.Size.XY * a.Animation.Animation.CurrentSequence.Scale * Info.Scale).ToInt2())
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
var pos = self.CenterPosition - new WVec(0, 0, dat.Length);
|
||||
var palette = wr.Palette(info.ShadowPalette);
|
||||
var tintModifiers = shadow.CurrentSequence.IgnoreWorldTint ? TintModifiers.IgnoreWorldTint : TintModifiers.None;
|
||||
return new IRenderable[] { new SpriteRenderable(shadow.Image, pos, info.ShadowOffset, info.ShadowZOffset, palette, 1, true, tintModifiers) };
|
||||
return new IRenderable[] { new SpriteRenderable(shadow.Image, pos, info.ShadowOffset, info.ShadowZOffset, palette, shadow.CurrentSequence.Scale, true, tintModifiers) };
|
||||
}
|
||||
|
||||
IEnumerable<Rectangle> IRender.ScreenBounds(Actor self, WorldRenderer wr)
|
||||
|
||||
Reference in New Issue
Block a user