Merge pull request #6065 from atlimit8/SellNonBuildings

Sell non buildings
This commit is contained in:
Paul Chote
2014-07-26 15:52:33 +12:00
2 changed files with 4 additions and 2 deletions

View File

@@ -38,9 +38,11 @@ Also thanks to:
* Frank Razenberg (zzattack)
* Gareth Needham (Ripley`)
* Gordon Martin (Happy0)
* Ian T. Jacobsen (Smilex)
* Igor Popov (ihptru)
* Iran
* James Dunne (jsd)
* Jason (atlimit8)
* Jeff Harris (jeff_1amstudios)
* Jes
* Joakim Lindberg (booom3)
@@ -84,7 +86,6 @@ Also thanks to:
* Tristan Mühlbacher (MicroBit)
* Vladimir Komarov (VrKomarov)
* Wuschel
* Ian T. Jacobsen (Smilex)
Using Simple DirectMedia Layer distributed under
the terms of the zlib license.

View File

@@ -31,7 +31,8 @@ namespace OpenRA.Mods.RA
public void Sell(Actor self)
{
if (!self.Trait<Building>().Lock())
var building = self.TraitOrDefault<Building>();
if (building != null && !building.Lock())
return;
self.CancelActivity();