[PATCH] change the way renamed entities are taken into account
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.
In 13355: