mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-23 10:33:13 +00:00
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.
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user