Tidy production exits, cnc only

This commit is contained in:
Paul Chote
2010-09-01 20:22:06 +12:00
parent dca5f8d27b
commit 4e0ace6ec5
7 changed files with 59 additions and 43 deletions

View File

@@ -37,8 +37,7 @@ namespace OpenRA.Mods.Cnc
// Assume a single exit point for simplicity
var spawn = self.CenterLocation + Spawns.First().First;
var exit = self.Location + Spawns.First().Second;
var exit = self.Info.Traits.WithInterface<ExitInfo>().First();
var rb = self.Trait<RenderBuilding>();
rb.PlayCustomAnimRepeating(self, "active");
@@ -65,7 +64,7 @@ namespace OpenRA.Mods.Cnc
if (self.IsDead())
return;
rb.PlayCustomAnimRepeating(self, "idle");
self.World.AddFrameEndTask(ww => DoProduction(self, cargo.Unload(self), exit, spawn));
self.World.AddFrameEndTask(ww => DoProduction(self, cargo.Unload(self), exit));
}));
a.QueueActivity(new Fly(endPos));
a.QueueActivity(new RemoveSelf());