mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 11:25:45 +00:00
Do not compute capture points for the invalid player on player defeat
Reviewed By: Freagarach Refs #5745 Differential Revision: https://code.wildfiregames.com/D2748 This was SVN commit r23709.
This commit is contained in:
@@ -362,7 +362,8 @@ Capturable.prototype.OnGlobalPlayerDefeated = function(msg)
|
||||
if (!this.cp[msg.playerId])
|
||||
return;
|
||||
let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
|
||||
if (cmpOwnership && cmpOwnership.GetOwner() == msg.playerId)
|
||||
if (cmpOwnership && (cmpOwnership.GetOwner() == INVALID_PLAYER ||
|
||||
cmpOwnership.GetOwner() == msg.playerId))
|
||||
return;
|
||||
this.cp[0] += this.cp[msg.playerId];
|
||||
this.cp[msg.playerId] = 0;
|
||||
|
||||
Reference in New Issue
Block a user