mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user