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;
}