Opened 3 years ago

Closed 3 years ago

#6046 closed defect (fixed)

order queue not flushed

Reported by: snelius Owned by: Freagarach
Priority: Must Have Milestone: Alpha 25
Component: Simulation Keywords: UnitAI
Cc: snelius Patch: Phab:D3587

Description

test scenario:
do A
then unselect unit
then select same unit again
do B (give another order queue)

A) give unit orders in a queue to

  1. build a barrack (no SHIFT pressed)
  2. build a house (with SHIFT button pressed => add next step to new queue "A")
  3. go to gather berries (with SHIFT button pressed => next step to A queue)

B) give unit orders in a queue to

  1. build a barrack (no SHIFT pressed => queue A should be flushed like in a23)
    In this step simply right click on a barrack which is actually being build without SHIFT button pressed.
  2. build a house (with SHIFT button pressed => add next step to new queue "B")
  3. go cut wood (with SHIFT button pressed => next step to B queue)

Expected result: after building house unit should gather wood BUT will gather berries, i.e. queue A is remembered but should have been erased in step B.1 - this step should overwrite or flush old queue A.

Please see attached replay from a24 revision 24933

Attachments (1)

2021-02-20_order queue not flushed.zip (31.6 KB ) - added by snelius 3 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by Freagarach, 3 years ago

In r24855, we don't readd an order given what is essentially the same order, to prevent entities not doing stuff when ordered repeatedly.

We didn't take into account to flush the rest of the queue.

comment:2 by Freagarach, 3 years ago

Component: Core engineSimulation
Keywords: UnitAI added; order queue removed
Milestone: BacklogWork In Progress
Patch: Phab:D3587
Priority: Release BlockerMust Have

comment:3 by Freagarach, 3 years ago

(Not for A24 by the way.)

comment:4 by wraitii, 3 years ago

Milestone: Work In ProgressAlpha 25

Decided not to fix for A24 as the issue should not really affect many people, and there's an easy "manual" fix.

comment:5 by Freagarach, 3 years ago

Owner: set to Freagarach
Resolution: fixed
Status: newclosed

In 25100:

Flush order queue when given an order to perform a action on the same entity.

Follows r24855 / rP24855.

Fixes: #6046
Differential revision: D3587
Reviewed by: @wraitii

Note: See TracTickets for help on using tickets.