|
|
Reporter | SteveL | Assigned To | SteveL | |
---|
Priority | normal | Severity | normal | Reproducibility | always |
---|
Status | resolved | Resolution | fixed | |
---|
Product Version | TDM 2.01 | |
---|
Target Version | TDM 2.02 | Fixed in Version | TDM 2.02 | |
---|
|
|
Summary | 0003719: Script event changeLootAmount() behaves wrong when removing all loot |
---|
Description | changeLootAmount() 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 Information | Caused 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. |
---|
Tags | No tags attached. |
---|
|
|