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.
This commit is contained in:
Itms 2016-03-24 21:48:15 +00:00
parent aa64a92d1a
commit e8decfbd2b

View file

@ -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;