mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-20 23:33:59 -07:00
Don't recompute auras of each and every entity globally upon playerdefeat, but only all player auras (for simplicity, and the affected units, structures upon OwnershipChange), refs 6d318d0869 / D12.
The next diff changes this to a global message subscription, so that it is easier to recognize. Fixes #5099. From Differential_Revision: https://code.wildfiregames.com/D1426 Pointed out by: fatherbushido Reviewed By: temple This was SVN commit r21711.
This commit is contained in:
parent
91d85ea1b1
commit
2651caa885
1 changed files with 6 additions and 0 deletions
|
|
@ -480,8 +480,14 @@ Auras.prototype.OnGlobalResearchFinished = function(msg)
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Only update playerauras, since units and structures are updated OnOwnershipChanged.
|
||||
*/
|
||||
Auras.prototype.OnPlayerDefeated = function(msg)
|
||||
{
|
||||
if (!Engine.QueryInterface(this.entity, IID_Player))
|
||||
return;
|
||||
|
||||
this.Clean();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue