Fix treasure in statistics

Introduced in ea96e81098.
Wrong entity is passed when getting statistic tracker, so collected
treasure is not updated correctly in statistics.
Reported on forum:
https://wildfiregames.com/forum/topic/47585-a25-svn-treasures-collected-not-registering-under-resources-summary-playing-atlas-mountains/?tab=comments#comment-441383

This was SVN commit r25824.
This commit is contained in:
Angen
2021-07-13 16:46:32 +00:00
parent 68e40575a4
commit f891ed4e53
@@ -70,7 +70,7 @@ Treasure.prototype.Reward = function(entity)
if (this.resources)
cmpPlayer.AddResources(this.resources);
let cmpStatisticsTracker = QueryOwnerInterface(this.entity, IID_StatisticsTracker);
let cmpStatisticsTracker = QueryOwnerInterface(entity, IID_StatisticsTracker);
if (cmpStatisticsTracker)
cmpStatisticsTracker.IncreaseTreasuresCollectedCounter();