mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07: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:
parent
2cf88d79a4
commit
e396ff170e
2 changed files with 16 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue