diff --git a/binaries/data/mods/public/simulation/components/Auras.js b/binaries/data/mods/public/simulation/components/Auras.js index 18d616eb6d..53fe2610dd 100644 --- a/binaries/data/mods/public/simulation/components/Auras.js +++ b/binaries/data/mods/public/simulation/components/Auras.js @@ -258,15 +258,19 @@ Auras.prototype.Clean = function() } needVisualizationUpdate = true; - this[name].rangeQuery = cmpRangeManager.CreateActiveQuery( - this.entity, - 0, - this.GetRange(name), - affectedPlayers, - IID_Identity, - cmpRangeManager.GetEntityFlagMask("normal") - ); - cmpRangeManager.EnableActiveQuery(this[name].rangeQuery); + + if (this[name].isApplied) + { + this[name].rangeQuery = cmpRangeManager.CreateActiveQuery( + this.entity, + 0, + this.GetRange(name), + affectedPlayers, + IID_Identity, + cmpRangeManager.GetEntityFlagMask("normal") + ); + cmpRangeManager.EnableActiveQuery(this[name].rangeQuery); + } } if (needVisualizationUpdate) diff --git a/binaries/data/mods/public/simulation/components/RangeVisualization.js b/binaries/data/mods/public/simulation/components/RangeVisualization.js index b52f286fb7..7f5202575c 100644 --- a/binaries/data/mods/public/simulation/components/RangeVisualization.js +++ b/binaries/data/mods/public/simulation/components/RangeVisualization.js @@ -100,7 +100,9 @@ RangeVisualization.prototype.OnValueModification = function(msg) this.RegenerateRangeVisualizations(false); }; -/** RangeVisualization component is deserialized before the TechnologyManager, so need to update the ranges here */ +/** + * RangeVisualization component is deserialized before the TechnologyManager, so need to update the ranges here + */ RangeVisualization.prototype.OnDeserialized = function(msg) { for (let type in this.enabledRangeTypes)