Opened 10 years ago

Closed 10 years ago

#2724 closed defect (fixed)

Renaming of destroyed mirages leads to wrong reset of some internal AI metadata

Reported by: mimo Owned by:
Priority: Should Have Milestone: Alpha 17
Component: UI & Simulation Keywords:
Cc: Itms Patch:

Description

When mirages are destroyed (because back in visibility), we send a EntityRenamed(old=mirage, new=entity) message. But this creates problems with the AI which, in case of a remane, copy all its internal metadata from the old to the new. So in the case of a mirage which have no metadata, this would reset all the info from the entity. The attached patch contains a simple fix to prevent these mirages renaming to be sent to the AI.

Attachments (1)

rename.diff (644 bytes ) - added by mimo 10 years ago.

Download all attachments as: .zip

Change History (5)

by mimo, 10 years ago

Attachment: rename.diff added

comment:1 by Stan, 10 years ago

Keywords: review patch added

comment:2 by mimo, 10 years ago

In 15642:

AI should not use EntityRenamed messages coming from mirages, addresses #2724

comment:3 by mimo, 10 years ago

Keywords: review patch removed

I've commited the patch as it was needed for the AI, but I leave the ticket open because I've the impression that this use of EntityRenamed message in the mirage case is a misappropriation and we should may-be have a dedicated message. But feel free to close this bug otherwise.

comment:4 by Itms, 10 years ago

Resolution: fixed
Status: newclosed

Thanks for the fix mimo, the EntityRenamed message is appropriated IMHO but the check you added was necessary.

Note: See TracTickets for help on using tickets.