From eccdc475442df44e568cab0d2912c73718f89e83 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 24 Jun 2016 15:29:57 +0200 Subject: [PATCH 1/2] Remove trailing spaces and tabs from cnc64gdi01.lua --- mods/cnc/maps/cnc64gdi01/cnc64gdi01.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/cnc/maps/cnc64gdi01/cnc64gdi01.lua b/mods/cnc/maps/cnc64gdi01/cnc64gdi01.lua index b55e7d466a..dd854c36ff 100644 --- a/mods/cnc/maps/cnc64gdi01/cnc64gdi01.lua +++ b/mods/cnc/maps/cnc64gdi01/cnc64gdi01.lua @@ -73,13 +73,13 @@ WorldLoaded = function() Trigger.OnKilled(Biolab, function() player.MarkCompletedObjective(destroyBiotechCenterObjective) end) - + Trigger.OnCapture(Biolab, function() Biolab.Kill() end) Trigger.OnDamaged(Biolab, HuntTriggerFunction) - + AIRepairBuildings(enemy) AIRebuildHarvesters(enemy) @@ -101,7 +101,7 @@ end Tick = function() if DateTime.GameTime > DateTime.Seconds(5) and player.HasNoRequiredUnits() then - player.MarkFailedObjective(destroyBiotechCenterObjective) + player.MarkFailedObjective(destroyBiotechCenterObjective) end end From dd5e229886e1b02f09746c14da93faef89e7b8ff Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 24 Jun 2016 15:30:57 +0200 Subject: [PATCH 2/2] Fix a crash with not space occupying actors granting support powers --- .../Traits/SupportPowers/SupportPowerManager.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs index e6ea859e95..b9336983ea 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs @@ -236,7 +236,14 @@ namespace OpenRA.Mods.Common.Traits return; var power = Instances.Where(i => !InstanceDisabled(i)) - .MinByOrDefault(a => (a.Self.CenterPosition - a.Self.World.Map.CenterOfCell(order.TargetLocation)).HorizontalLengthSquared); + .MinByOrDefault(a => + { + if (a.Self.OccupiesSpace == null) + return 0; + + return (a.Self.CenterPosition - a.Self.World.Map.CenterOfCell(order.TargetLocation)).HorizontalLengthSquared; + }); + if (power == null) return;