Allow turrets to have a different facing count to the actor body.

This commit is contained in:
Paul Chote
2013-05-25 16:12:51 +12:00
parent 13f8d944d2
commit 1d5f67cb6a
3 changed files with 28 additions and 3 deletions

View File

@@ -54,6 +54,9 @@ namespace OpenRA.Mods.RA.Render
anim.Play(info.Sequence);
rs.anims.Add("turret_{0}".F(info.Turret), new AnimationWithOffset(
anim, () => TurretOffset(self), null, p => ZOffsetFromCenter(self, p, 1)));
// Restrict turret facings to match the sprite
t.QuantizedFacings = anim.CurrentSequence.Facings;
}
WVec TurretOffset(Actor self)