Move harvester animation z offset to sequences.

This commit is contained in:
Paul Chote
2013-07-15 19:48:51 +12:00
parent dcbef51ba0
commit a642b8298e
3 changed files with 2 additions and 5 deletions

View File

@@ -24,9 +24,6 @@ namespace OpenRA.Mods.RA.Render
[Desc("Position relative to body")] [Desc("Position relative to body")]
public readonly WVec Offset = WVec.Zero; public readonly WVec Offset = WVec.Zero;
[Desc("Additional draw-order offset")]
public readonly int ZOffset = 0;
public object Create(ActorInitializer init) { return new WithHarvestAnimation(init.self, this); } public object Create(ActorInitializer init) { return new WithHarvestAnimation(init.self, this); }
} }
@@ -47,7 +44,7 @@ namespace OpenRA.Mods.RA.Render
rs.anims.Add("harvest_{0}".F(info.Sequence), new AnimationWithOffset(anim, rs.anims.Add("harvest_{0}".F(info.Sequence), new AnimationWithOffset(anim,
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))), () => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
() => !visible, () => !visible,
p => WithTurret.ZOffsetFromCenter(self, p, info.ZOffset))); p => WithTurret.ZOffsetFromCenter(self, p, 0)));
} }
public void Harvested(Actor self, ResourceType resource) public void Harvested(Actor self, ResourceType resource)

View File

@@ -89,7 +89,6 @@ HARVESTER:
LeavesHusk: LeavesHusk:
HuskActor: Harvester.Husk HuskActor: Harvester.Husk
WithHarvestAnimation: WithHarvestAnimation:
ZOffset: 1
HARVESTER.Husk: HARVESTER.Husk:
Inherits: ^Husk Inherits: ^Husk

View File

@@ -72,6 +72,7 @@ harvester:
Length: 6 Length: 6
Facings: 8 Facings: 8
Tick: 80 Tick: 80
ZOffset: 1
dock: unload2 dock: unload2
Start: 0 Start: 0
Length: 10 Length: 10