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:
elexis 2018-04-13 15:30:46 +00:00
parent 91d85ea1b1
commit 2651caa885

View file

@ -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();
};