Index: binaries/data/mods/public/simulation/components/Player.js =================================================================== --- binaries/data/mods/public/simulation/components/Player.js +++ binaries/data/mods/public/simulation/components/Player.js @@ -394,12 +394,14 @@ } // With the real ownership change complete, send OwnershipChanged messages. + let before = new Date().getMilliseconds(); for (let entity of entities) Engine.PostMessage(entity, MT_OwnershipChanged, { "entity": entity, "from": this.playerID, "to": 0 }); + warn("Ownership change took " + (new Date().getMilliseconds() - before) + "ms"); } Engine.BroadcastMessage(won ? MT_PlayerWon : MT_PlayerDefeated, { "playerId": this.playerID }); Index: binaries/data/mods/public/simulation/components/RallyPoint.js =================================================================== --- binaries/data/mods/public/simulation/components/RallyPoint.js +++ binaries/data/mods/public/simulation/components/RallyPoint.js @@ -105,9 +105,8 @@ RallyPoint.prototype.OnOwnershipChanged = function(msg) { - // No need to reset when constructing or destructing the entity - // Don't reset upon defeat to improve performance - if (msg.from == -1 || msg.to < 1) + // No need to reset when constructing the entity + if (msg.from == -1) return; this.Reset();