View Issue Details

IDProjectCategoryView StatusLast Update
0003719The Dark ModCodingpublic25.04.2014 19:59
ReporterSteveL Assigned ToSteveL  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.01 
Target VersionTDM 2.02Fixed in VersionTDM 2.02 
Summary0003719: Script event changeLootAmount() behaves wrong when removing all loot
DescriptionchangeLootAmount() adjusts the displayed loot totals and the mission stat for total loot found. This works in every case but one: if you try to remove *all* the player's loot for a given category, i.e. remove the exact amount that the player has, the displayed totals will change but the mission stats will remain unaffected.
Additional InformationCaused by a bit of bad logic in idEntity::ChangeLootAmount(). "int rc" is used both as a boolean to test whether the loot type passed by the mapper is valid, and to return the updated loot amount. When you remove all loot, the updated loot amount is zero so the validity test fails and the mission stats don't get updated. But the displayed amount has already been changed at this point.

Diagnosis and patch provided by gnartsch in a beta testing thread, using a separate bool for the validity test.
TagsNo tags attached.

Activities

SteveL

SteveL

25.04.2014 19:59

reporter   ~0006558

At revision: 5965

Issue History

Date Modified Username Field Change
25.04.2014 18:31 SteveL New Issue
25.04.2014 18:31 SteveL Status new => assigned
25.04.2014 18:31 SteveL Assigned To => SteveL
25.04.2014 19:59 SteveL Note Added: 0006558
25.04.2014 19:59 SteveL Status assigned => resolved
25.04.2014 19:59 SteveL Fixed in Version => TDM 2.02
25.04.2014 19:59 SteveL Resolution open => fixed