forked from mirrors/0ad
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:
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user