mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-15 05:15:42 +00:00
No need to create aura's rangequery when the aura is not applied
Reviewed By: fatherbushido Differential Revision: https://code.wildfiregames.com/D963 This was SVN commit r20300.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user