pruning LocalOrderSource content
This commit is contained in:
@@ -95,6 +95,7 @@ namespace OpenRa.Game
|
||||
|
||||
// HACK: Get the first unit in the cell
|
||||
// This will need to be updated for multiple-infantry-in-a-cell
|
||||
// HACK: this doesn't work for targeting air units either
|
||||
var underCursor = Game.UnitInfluence.GetUnitsAt( xy ).FirstOrDefault()
|
||||
?? Game.BuildingInfluence.GetBuildingAt( xy );
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user