Support dynamic offsets in ActorPreviews.

This commit is contained in:
teees
2016-06-05 11:25:14 +01:00
committed by Paul Chote
parent b7bf7b6ec0
commit 8724ed29bc
20 changed files with 57 additions and 41 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits
// Z-order is one set to the top of the footprint
var offset = map.CenterOfCell(cell) - map.CenterOfCell(location) - centerOffset;
yield return new SpriteActorPreview(anim, offset, -(offset.Y + centerOffset.Y + 512), p, rs.Scale);
yield return new SpriteActorPreview(anim, () => offset, () => -(offset.Y + centerOffset.Y + 512), p, rs.Scale);
}
}
}