From 668dfa1f6f1f24830edd4af9187015dcfb667c7d Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 16 May 2011 20:22:16 +1200 Subject: [PATCH] don't show cashticks when there is no refund --- OpenRA.Mods.RA/Activities/Sell.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/Activities/Sell.cs b/OpenRA.Mods.RA/Activities/Sell.cs index db31ff501e..7313905295 100755 --- a/OpenRA.Mods.RA/Activities/Sell.cs +++ b/OpenRA.Mods.RA/Activities/Sell.cs @@ -33,8 +33,11 @@ namespace OpenRA.Mods.RA.Activities foreach (var ns in self.TraitsImplementing()) ns.Sold(self); - if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) - self.World.AddFrameEndTask(w => w.Add(new CashTick(refund, 30, 2, self.CenterLocation, self.Owner.ColorRamp.GetColor(0)))); + if (refund > 0 && self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally) + self.World.AddFrameEndTask( + w => w.Add(new CashTick(refund, 30, 2, + self.CenterLocation, + self.Owner.ColorRamp.GetColor(0)))); self.Destroy(); return this;