Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1903 closed defect (fixed)

[PATCH] change the way renamed entities are taken into account

Reported by: mimo Owned by: leper
Priority: Should Have Milestone: Alpha 14
Component: Core engine Keywords: entity rename patch
Cc: Patch:

Description

May-be I missed something in the EntityRenamed logic in UnitAI, but I think we must loose some target orders when that target entity has been renamed because usually only the first order on queue is updated. There are a few cases where also the second order is updated, but still a lot of cases are not taken into account when several orders are in queue. An example is if we have an order attack, but the unit needs to unpack before and the target is promoted during unpacking, no update of the target is presently done.

I think a safer approach would be to remove all this EntityRenamed FSM stuff, and do everything in the OnGlobalEntityRenamed. That would simplify the code, and be more general because not doing any asumption on the order of the orders. Here is a patch which does that.

Attachments (1)

entityRename.diff (2.4 KB ) - added by mimo 11 years ago.

Download all attachments as: .zip

Change History (4)

by mimo, 11 years ago

Attachment: entityRename.diff added

comment:1 by mimo, 11 years ago

Keywords: entity rename patch review added

comment:2 by leper, 11 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 13355:

Change target for all orders on EntityRenamed. Patch by mimo. Fixes #1903.

comment:3 by leper, 11 years ago

Keywords: review removed
Milestone: BacklogAlpha 14

Thanks for the patch. Handling it this way should fix some awkwardness from queued orders with siege (packed/unpacked) and citizen soldier (promotion) as targets. (Small nitpick == != =)

Note: See TracTickets for help on using tickets.