pruning LocalOrderSource content

This commit is contained in:
Chris Forbes
2009-12-28 09:41:06 +13:00
parent fc030fae5c
commit 6a0f019045
2 changed files with 5 additions and 2 deletions

View File

@@ -8,10 +8,12 @@ namespace OpenRa.Game
public List<Order> OrdersForFrame(int currentFrame)
{
// TODO: prune `orders` based on currentFrame.
if (!orders.ContainsKey(currentFrame))
return new List<Order>();
return orders[currentFrame];
var result = orders[currentFrame];
orders.Remove(currentFrame);
return result;
}
public void SendLocalOrders(int localFrame, List<Order> localOrders)