From 9ae452e8d68f6f53bff278330fe1f81b2d877bd5 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 15 Oct 2010 18:38:09 +1300 Subject: [PATCH] make GiveMcvCrateAction less stupid, if the GiveUnitCrateAction says it can't do it. --- OpenRA.Mods.RA/Crates/GiveMcvCrateAction.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.RA/Crates/GiveMcvCrateAction.cs b/OpenRA.Mods.RA/Crates/GiveMcvCrateAction.cs index 587816dd69..bdfc8cfd70 100644 --- a/OpenRA.Mods.RA/Crates/GiveMcvCrateAction.cs +++ b/OpenRA.Mods.RA/Crates/GiveMcvCrateAction.cs @@ -26,6 +26,9 @@ namespace OpenRA.Mods.RA.Crates public override int GetSelectionShares(Actor collector) { + if (base.GetSelectionShares(collector) == 0) + return 0; // there's some other really good reason why we shouldn't give this. + var hasBase = self.World.Queries.OwnedBy[collector.Owner].WithTrait().Any(); return hasBase ? info.SelectionShares : (info as GiveMcvCrateActionInfo).NoBaseSelectionShares; }