Opened 13 years ago

Closed 13 years ago

#859 closed defect (fixed)

[PATCH] Control groups don't recognise promotions

Reported by: Philip Taylor Owned by:
Priority: Should Have Milestone: Alpha 7
Component: Core engine Keywords: simple, patch
Cc: Patch:

Description

When a unit gets promoted after collecting enough XP, it gets dropped from any control groups it was assigned to. Probably need to have EntityGroupsContainer do something a bit like EntitySelection.prototype.checkRenamedEntities does to update after entity renamings (though it might need a little refactoring so the same rename list is passed to both classes that need it).

Attachments (1)

859.patch (1.2 KB ) - added by gruby 13 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Kieran P, 13 years ago

Milestone: Alpha 6Alpha 7

by gruby, 13 years ago

Attachment: 859.patch added

comment:2 by gruby, 13 years ago

Keywords: review added

comment:3 by gruby, 13 years ago

Summary: Control groups don't recognise promotions[PATCH] Control groups don't recognise promotions

comment:4 by Kieran P, 13 years ago

Keywords: patch added

comment:5 by Philip Taylor, 13 years ago

Keywords: review removed

From IRC when the patch was uploaded:

18:06 <@Philip`> gruby: Hmm, I think that might break EntitySelection's rename handling
18:06 <@Philip`> since Engine.GuiInterfaceCall("GetRenamedEntities", true) clears the renamed list (when the second argument is true) so it'll be an empty list when it's called a second time
...
18:07 <@Philip`> (It might be nicer to separate the 'get' and 'clear' functionality into two separate GuiInterface functions, and call clear once at the end of the per-frame GUI up date function, or something)

comment:6 by Android GRRR, 13 years ago

how about duplicating GetRenamedEntities and make it a GetNotClearRenamedEntities that can be used in this patch? sorry if this is unqualified.

comment:7 by ben, 13 years ago

Resolution: fixed
Status: newclosed

(In [10140]) Fixes promoted entities dropping from control groups, based on patch from gruby. Fixes #859.

Note: See TracTickets for help on using tickets.