This commit is contained in:
Paul Chote
2011-05-04 10:46:51 +12:00
parent 6495478433
commit 2d7f3086f6
3 changed files with 8 additions and 4 deletions

View File

@@ -120,9 +120,10 @@ namespace OpenRA.Traits
public Renderable Image( Actor self, string pal )
{
var loc = self.CenterLocation - 0.5f * Animation.Image.size
var p = self.CenterLocation;
var loc = p - 0.5f * Animation.Image.size
+ (OffsetFunc != null ? OffsetFunc() : float2.Zero);
var r = new Renderable(Animation.Image, loc, pal, (int)self.CenterLocation.Y);
var r = new Renderable(Animation.Image, loc, pal, p.Y);
return ZOffset != 0 ? r.WithZOffset(ZOffset) : r;
}

View File

@@ -69,8 +69,11 @@ namespace OpenRA.Mods.RA.Effects
public IEnumerable<Renderable> Render()
{
if (show && !self.Destroyed)
yield return new Renderable(anim.Image, self.CenterLocation - 0.5f * anim.Image.size, rs.Palette(self.Owner), (int)self.CenterLocation.Y)
{
var p = self.CenterLocation;
yield return new Renderable(anim.Image, p - 0.5f * anim.Image.size, rs.Palette(self.Owner), p.Y)
.WithScale(1.5f);
}
}
}
}

View File

@@ -109,7 +109,7 @@ namespace OpenRA.Mods.RA
RankAnim.Tick(); // hack
var bounds = self.GetBounds(false);
yield return new Renderable(RankAnim.Image,
new float2(bounds.Right - 6, bounds.Bottom - 8), "effect", (int)self.CenterLocation.Y);
new float2(bounds.Right - 6, bounds.Bottom - 8), "effect", self.CenterLocation.Y);
}
}