Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/Auras.js
Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | if (!this.IsRangeAura(name)) | ||||
this.ApplyAura(name, targetUnitsClone[name]); | this.ApplyAura(name, targetUnitsClone[name]); | ||||
continue; | continue; | ||||
} | } | ||||
needVisualizationUpdate = true; | needVisualizationUpdate = true; | ||||
if (this[name].isApplied && (this.IsRangeAura(name) || this.IsGlobalAura(name) && !!this.GetOverlayIcon(name))) | if (this[name].isApplied && (this.IsRangeAura(name) || this.IsGlobalAura(name) && !!this.GetOverlayIcon(name))) | ||||
{ | { | ||||
// Do not account for entity sizes: structures can have various sizes | |||||
// and we currently prefer auras to not depend on the source size | |||||
// (this is generally irrelevant for units). | |||||
this[name].rangeQuery = cmpRangeManager.CreateActiveQuery( | this[name].rangeQuery = cmpRangeManager.CreateActiveQuery( | ||||
this.entity, | this.entity, | ||||
0, | 0, | ||||
this.GetRange(name), | this.GetRange(name), | ||||
affectedPlayers, | affectedPlayers, | ||||
IID_Identity, | IID_Identity, | ||||
cmpRangeManager.GetEntityFlagMask("normal") | cmpRangeManager.GetEntityFlagMask("normal"), | ||||
false | |||||
); | ); | ||||
cmpRangeManager.EnableActiveQuery(this[name].rangeQuery); | cmpRangeManager.EnableActiveQuery(this[name].rangeQuery); | ||||
} | } | ||||
} | } | ||||
if (needVisualizationUpdate) | if (needVisualizationUpdate) | ||||
{ | { | ||||
let cmpRangeOverlayManager = Engine.QueryInterface(this.entity, IID_RangeOverlayManager); | let cmpRangeOverlayManager = Engine.QueryInterface(this.entity, IID_RangeOverlayManager); | ||||
▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator