Fix cancellation issues and animation flicker

This commit is contained in:
Paul Chote
2010-06-16 10:37:54 +12:00
parent 40ba80b1e3
commit 5822caf7a8
3 changed files with 46 additions and 19 deletions

View File

@@ -44,21 +44,22 @@ namespace OpenRA.Mods.Cnc
{
dockedHarv = harv;
self.traits.Get<RenderBuilding>().PlayCustomAnim(self, "active");
}) );
harv.QueueActivity( new Drag(startDock, endDock, 11) );
harv.QueueActivity( new CallFunc( () =>
{
self.World.AddFrameEndTask( w1 =>
harv.QueueActivity( new Drag(startDock, endDock, 12) );
harv.QueueActivity( new CallFunc( () =>
{
harvester.Visible = false;
harvester.Deliver(harv, self);
});
self.World.AddFrameEndTask( w1 =>
{
harvester.Visible = false;
harvester.Deliver(harv, self);
});
}, false ) );
harv.QueueActivity( new Wait(18, false ) );
harv.QueueActivity( new CallFunc( () => harvester.Visible = true, false ) );
harv.QueueActivity( new Drag(endDock, startDock, 12) );
harv.QueueActivity( new CallFunc( () => dockedHarv = null, false ) );
harv.QueueActivity( new Harvest() );
}) );
harv.QueueActivity( new Wait(18) );
harv.QueueActivity( new CallFunc( () => harvester.Visible = true) );
harv.QueueActivity( new Drag(endDock, startDock, 11) );
harv.QueueActivity( new CallFunc( () => dockedHarv = null) );
harv.QueueActivity( new Harvest() );
}
}