From e8decfbd2baaea160f797f13511b9108e42629f8 Mon Sep 17 00:00:00 2001 From: Itms Date: Thu, 24 Mar 2016 21:48:15 +0000 Subject: [PATCH] Amend fdf7dabe18: the foundation component won't exist for a mirage (foundation inside the fog-of-war) so the miraged interface to it should be queried. Fixes #3849. This was SVN commit r17949. --- binaries/data/mods/public/simulation/components/UnitAI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/data/mods/public/simulation/components/UnitAI.js b/binaries/data/mods/public/simulation/components/UnitAI.js index 143bff7072..00007e1c1a 100644 --- a/binaries/data/mods/public/simulation/components/UnitAI.js +++ b/binaries/data/mods/public/simulation/components/UnitAI.js @@ -5807,7 +5807,7 @@ UnitAI.prototype.CanRepair = function(target) return false; // Verify that the target can be either built or repaired - var cmpFoundation = Engine.QueryInterface(target, IID_Foundation); + var cmpFoundation = QueryMiragedInterface(target, IID_Foundation); var cmpRepairable = Engine.QueryInterface(target, IID_Repairable); if (!cmpFoundation && !cmpRepairable) return false;