From 47581ea900ccf3d40b795da2a5e918fb19973933 Mon Sep 17 00:00:00 2001 From: wraitii Date: Sat, 24 Aug 2019 08:20:30 +0000 Subject: [PATCH] Fix resourceGatherer value modifications following e16c4c4800 e16c4c4800 expects player-wide modifications to invalidate entity caches. However, this requires the entity to have an owner when calling ApplyModifiers. ResourceGatherer caches its gather rates at Init, when entities do now yet have their correct owner, and thus this fails. Since OnOwnershipChanged also caches gather rates however, this call is redundant (and needlessly slow) so it can just be deleted. Differential Revision: https://code.wildfiregames.com/D2217 This was SVN commit r22768. --- .../data/mods/public/simulation/components/ResourceGatherer.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/binaries/data/mods/public/simulation/components/ResourceGatherer.js b/binaries/data/mods/public/simulation/components/ResourceGatherer.js index ae7085e3ab..002f55282a 100644 --- a/binaries/data/mods/public/simulation/components/ResourceGatherer.js +++ b/binaries/data/mods/public/simulation/components/ResourceGatherer.js @@ -40,8 +40,6 @@ ResourceGatherer.prototype.Init = function() // The last exact type gathered, so we can render appropriate props this.lastCarriedType = undefined; // { generic, specific } - - this.RecalculateGatherRatesAndCapacities(); }; /**