mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07: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:
parent
0363202a20
commit
ed2ae1d283
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue