Index: ps/trunk/binaries/data/mods/public/simulation/helpers/Commands.js =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/helpers/Commands.js +++ ps/trunk/binaries/data/mods/public/simulation/helpers/Commands.js @@ -710,16 +710,6 @@ continue; } - if (!CanGarrisonedChangeTemplate(ent, cmd.template)) - { - var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface); - cmpGUIInterface.PushNotification({ - "players": [player], - "message": markForTranslation("Cannot upgrade a garrisoned entity.") - }); - continue; - } - // Check entity limits var cmpEntityLimits = QueryPlayerIDInterface(player, IID_EntityLimits); if (cmpEntityLimits && !cmpEntityLimits.AllowedToReplace(ent, cmd.template)) Index: ps/trunk/binaries/data/mods/public/simulation/helpers/Transform.js =================================================================== --- ps/trunk/binaries/data/mods/public/simulation/helpers/Transform.js +++ ps/trunk/binaries/data/mods/public/simulation/helpers/Transform.js @@ -140,19 +140,6 @@ return newEnt; } -function CanGarrisonedChangeTemplate(ent, template) -{ - var cmpPosition = Engine.QueryInterface(ent, IID_Position); - var unitAI = Engine.QueryInterface(ent, IID_UnitAI); - if (cmpPosition && !cmpPosition.IsInWorld() && unitAI && unitAI.IsGarrisoned()) - { - // We're a garrisoned unit, assume impossibility as I've been unable to find a way to get the holder ID. - // TODO: change this if that ever becomes possibles - return false; - } - return true; -} - function CopyControlGroups(oldEnt, newEnt) { let cmpObstruction = Engine.QueryInterface(oldEnt, IID_Obstruction); @@ -277,5 +264,4 @@ } Engine.RegisterGlobal("ChangeEntityTemplate", ChangeEntityTemplate); -Engine.RegisterGlobal("CanGarrisonedChangeTemplate", CanGarrisonedChangeTemplate); Engine.RegisterGlobal("ObstructionsBlockingTemplateChange", ObstructionsBlockingTemplateChange);