Fix #2070; cannot sell when building is being captured

This commit is contained in:
Curtis Shmyr
2012-04-30 02:43:02 -06:00
committed by Chris Forbes
parent 15dcd6a9f6
commit 45f5c054d5
2 changed files with 7 additions and 0 deletions

View File

@@ -27,6 +27,10 @@ namespace OpenRA.Mods.RA
{
if (order.OrderString == "Sell" && !Selling)
{
var capturing = self.TraitOrDefault<Capturable>();
if (capturing != null && capturing.CaptureInProgress)
return;
Selling = true;
foreach( var ns in self.TraitsImplementing<INotifySold>() )