Index: binaries/data/mods/public/simulation/components/GuiInterface.js =================================================================== --- binaries/data/mods/public/simulation/components/GuiInterface.js +++ binaries/data/mods/public/simulation/components/GuiInterface.js @@ -32,7 +32,7 @@ this.timeNotificationID = 1; this.timeNotifications = []; this.entsRallyPointsDisplayed = []; - this.entsWithAuraAndStatusBars = new Set(); + this.entsWithAuraAndStatusBars = []; this.enabledVisualRangeOverlayTypes = {}; }; @@ -906,7 +906,7 @@ GuiInterface.prototype.GetEntitiesWithStatusBars = function() { - return [...this.entsWithAuraAndStatusBars]; + return this.entsWithAuraAndStatusBars; }; GuiInterface.prototype.SetStatusBars = function(player, cmd) @@ -930,9 +930,9 @@ for (let e of cmpAuras.GetAffectedEntities(name)) affectedEnts.add(e); if (cmd.enabled) - this.entsWithAuraAndStatusBars.add(ent); + this.entsWithAuraAndStatusBars.push(ent); else - this.entsWithAuraAndStatusBars.delete(ent); + this.entsWithAuraAndStatusBars.splice(this.entsWithAuraAndStatusBars.indexOf(ent), 1); } } @@ -1108,6 +1108,10 @@ else result = cmpBuildRestrictions.CheckPlacement(); + let cmpRangeVisualization = Engine.QueryInterface(ent, IID_RangeVisualization); + if (cmpRangeVisualization) + cmpRangeVisualization.SetEnabled(true, this.enabledVisualRangeOverlayTypes); + // Set it to a red shade if this is an invalid location let cmpVisual = Engine.QueryInterface(ent, IID_Visual); if (cmpVisual)