Opened 3 years ago

Closed 3 years ago

#6175 closed defect (fixed)

Rally point - pick up treasures bug

Reported by: Langbart Owned by: Freagarach
Priority: Should Have Milestone: Alpha 25
Component: Simulation Keywords:
Cc: Patch: Phab:D3942

Description (last modified by Langbart)

While playing the latest SVN version [25403] on a random map called Lower Nubia, I received some errors while collecting treasures. To reproduce this, send all your starting units to collect treasures around the CC, start producing units in the CC and set the rally point on the treasures. Once a unit is in production but there are no more treasures around the CC, the errors occur.

0 A.D. (0.0.25) Main log (warnings and errors only)
ERROR: Error in timer on entity 150, IID80, function ProgressTimeout: ReferenceError: target is not defined
UnitAI.prototype.CollectTreasureNearPosition@simulation/components/UnitAI.js:5625:3 
collect-treasure-near-position/<@simulation/helpers/Commands.js:85:14
collect-treasure-near-position@simulation/helpers/Commands.js:84:67 
ProcessCommand@simulation/helpers/Commands.js:53:23 
ProductionQueue.prototype.SpawnUnits@simulation/components/ProductionQueue.js:748:18 
ProductionQueue.prototype.ProgressTimeout@simulation/components/ProductionQueue.js:840:26 
Timer.prototype.OnUpdate@simulation/components/Timer.js:139:44

Engine exited successfully on 2021-05-09 at 02:23:28 with 1384 message(s), 1 error(s) and 0 warning(s).

The problem is not reproducible for A24b. I will attach a replay file - 9_may_21.zip
This behavior can be observed for the first time with the changeset version [24999].

Attachments (2)

rally_point_treasure.jpg (52.9 KB ) - added by Langbart 3 years ago.
9_may_21.zip (3.9 KB ) - added by Langbart 3 years ago.

Download all attachments as: .zip

Change History (5)

by Langbart, 3 years ago

Attachment: rally_point_treasure.jpg added

by Langbart, 3 years ago

Attachment: 9_may_21.zip added

comment:1 by Langbart, 3 years ago

Description: modified (diff)

added changeset version [24999] to the description

comment:2 by Freagarach, 3 years ago

Component: UI – Game setupSimulation
Owner: set to Freagarach
Patch: Phab:D3942

comment:3 by Freagarach, 3 years ago

Resolution: fixed
Status: newclosed

In 25421:

Fix collecting treasures near position.

Also refactors the order a bit to be more equal to other orders.
Removes the autocontinue because it was not useful (since that is more about doing other tasks than the one ordered).
Follows r24989 r24999.

Differential revision: https://code.wildfiregames.com/D3942
Tested by: @Langbart
Fixes: #6175

Note: See TracTickets for help on using tickets.