#6670 closed defect (fixed)

Negative used resources in summary

Reported by: Langbart Owned by: Freagarach
Priority: Should Have Milestone: Alpha 27
Component: UI & Simulation Keywords:
Cc: Patch:

Description

reported by KarloManco in the forum: resourcesUsed counter bug (21/Dec/22)

When a unit which is being trained is cancelled, the resourcesUsed counter is decreased by twice the cost of this unit

to reproduce

  • Click on any building to train a new unit
  • Cancel the unit before it is completed.
  • Check in the summary the Resources Used field

reproducible

issue is not reproducible in A25b [25860]

bisect

[26000]

possible solution

KarloManco:

I have checked (in the newest version, [27288]) that by commenting lines 153 and 154 in the mentioned file (Trainer.js) the issue sees to be solved.

Attachments (1)

neg_res.png (177.7 KB ) - added by Langbart 17 months ago.

Download all attachments as: .zip

Change History (2)

by Langbart, 17 months ago

Attachment: neg_res.png added

comment:1 by Freagarach, 17 months ago

Owner: set to Freagarach
Resolution: fixed
Status: newclosed

In 27321:

Fix double resource subtraction on training stop.

Reported by @KarloManco at https://wildfiregames.com/forum/topic/102402-resourcesused-counter-bug/.
Introduced in r26000 / rP26000.

Fixes #6670

Note: See TracTickets for help on using tickets.