Opened 4 years ago

Closed 3 years ago

#3302 closed defect (duplicate)

[PATCH] missing control for deactivating guard order in mixed selection

Reported by: Kalle Richter Owned by: svott
Priority: Must Have Milestone:
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

After ordering a selection x of units to guard a unit y it's not possible to undo this order if a selection x' (with x being a subset of x') is selected. Units refuse orders and return to guard the unit and commit suicide.

experienced with d884ffa0b1c763742dae483a474c327d06ff4d7a

Attachments (1)

3302.js.patch (3.9 KB) - added by svott 4 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 4 years ago by stanislas69

Could you attach a system_info.txt, and a minimal testcase ? (Small map with few objects)

Changed 4 years ago by svott

Attachment: 3302.js.patch added

comment:2 Changed 4 years ago by svott

Keywords: simple patch added
Owner: set to svott
Summary: missing control for deactivating guard order in mixed selection[PATCH] missing control for deactivating guard order in mixed selection

I just add this.RemoveGuard?() to the orders. The number of adds doesn't look nice, but tell me if there is a better solution I am also not sure if I missed something or added to many remove-calls.

comment:3 Changed 3 years ago by Imarok

(If you want your patch reviewed you have to add the "review" keyword)

comment:4 Changed 3 years ago by elexis

Component: Core engineUI & Simulation
Keywords: review added
Milestone: BacklogAlpha 21

comment:5 Changed 3 years ago by fatherbushido

(It seems you forget to remove the warning L4914.)

comment:6 Changed 3 years ago by svott

I think I mentioned that in IRC and it is not enough to spend time for uploading another version

comment:7 Changed 3 years ago by sanderd17

I think it should be possible with altering fewer lines. Did you try adding a RemoveGuard? call to the "leave" functions of the INDIVIDUAL.GUARD state?

comment:8 Changed 3 years ago by svott

I tried and it does not work that way because a guarding unit always leaves the guard state when the unit stops - but the guarded attribute is still set

comment:9 Changed 3 years ago by fatherbushido

I don't understand the issue of the ticket. Guard order could/should be explicitly cancel in the gui. The issue would be better described as elexis reported: When I select one guarding and one non-guarding unit, I cant remove the guard as the icon is hidden if the garding units is not the first selected. According to some discussions on irc, it seems that it's not an UnitAI matter but a general gui problem, where possible orders are often based on the first unit of the selection. (see #3823)

I don't know if we want what the patch does. For example, if we order a unit to guard another, a walk order should not cancel the guard order, when the walk is done, the unit must return to guard.

Last edited 3 years ago by fatherbushido (previous) (diff)

comment:10 Changed 3 years ago by fatherbushido

Keywords: review removed

comment:11 Changed 3 years ago by elexis

Keywords: simple removed
Milestone: Alpha 21
Resolution: duplicate
Status: newclosed

Indeed not a simulation but GUI issue. Closing a duplicate of #3823.

Note: See TracTickets for help on using tickets.