hacked in selling to F3

This commit is contained in:
Chris Forbes
2010-01-02 12:50:45 +13:00
parent 0737335663
commit 43a8604ce9
5 changed files with 14 additions and 8 deletions

View File

@@ -13,10 +13,9 @@ namespace OpenRa.Game.Orders
{
var loc = mi.Location + Game.viewport.Location;
var underCursor = Game.FindUnits(loc, loc)
.Where( a => a.traits.Contains<Building>() ).FirstOrDefault();
if (underCursor != null && !underCursor.Info.Selectable)
underCursor = null;
.Where(a => a.Owner == Game.LocalPlayer
&& a.traits.Contains<Building>()
&& a.Info.Selectable).FirstOrDefault();
if (underCursor == null)
yield break;
@@ -25,9 +24,6 @@ namespace OpenRa.Game.Orders
if (building.unitInfo.Unsellable)
yield break;
if (underCursor.Owner != Game.LocalPlayer)
yield break;
yield return new Order("Sell", underCursor, null, int2.Zero, null);
}