From 6f54fe7e5d683268f0a5625a39d11f5156859d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Husti=C4=87?= Date: Sun, 5 Jul 2015 22:06:25 +0100 Subject: [PATCH] Upgrade granting warheads register as sources. --- OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs b/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs index d2eaa49680..324339ef41 100644 --- a/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs +++ b/OpenRA.Mods.Common/Warheads/GrantUpgradeWarhead.cs @@ -49,13 +49,16 @@ namespace OpenRA.Mods.Common.Warheads foreach (var u in Upgrades) { - if (!um.AcceptsUpgrade(a, u)) - continue; - if (Duration > 0) - um.GrantTimedUpgrade(a, u, Duration); + { + if (um.AcknowledgesUpgrade(a, u)) + um.GrantTimedUpgrade(a, u, Duration, firedBy); + } else - um.GrantUpgrade(a, u, this); + { + if (um.AcceptsUpgrade(a, u)) + um.GrantUpgrade(a, u, this); + } } } }