From ed2ae1d2831ac35e177811a8564330c453ea7dfb Mon Sep 17 00:00:00 2001 From: wraitii Date: Sat, 30 May 2020 06:25:10 +0000 Subject: [PATCH] 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. --- binaries/data/mods/public/simulation/components/Capturable.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/binaries/data/mods/public/simulation/components/Capturable.js b/binaries/data/mods/public/simulation/components/Capturable.js index af9b0c0963..0446b7cd1a 100644 --- a/binaries/data/mods/public/simulation/components/Capturable.js +++ b/binaries/data/mods/public/simulation/components/Capturable.js @@ -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;