Opened 3 years ago

Last modified 16 months ago

#5906 new defect

Allow garrisoned entities to transform into one that cannot garrison. — at Version 3

Reported by: Freagarach Owned by: Freagarach
Priority: Should Have Milestone: Backlog
Component: Simulation Keywords:
Cc: Patch:

Description (last modified by Freagarach)

Currently, when an entity that is garrisoned transforms (upgrades/promotes) into an entity that cannot garrison the formerly garrisoned holder, several things go wrong.

  • The garrison flag is not updated (should be done in eject, not perform eject. (Simple) (Phab:D3628)
  • The entity that was transformed disappears. This is because first the position of the transforming entity is used to set on the newly created entity -- Garrisoned, thus out of world. Only thereafter a message is sent to the GarrisonHolder to ungarrison (the transforming entity gets ejected and thus receives a position InWorld) and to garrison the new entity if possible (which it is not). Hence the new entity has a position out of world and can thus neither be selected nor seen by the player. (Phab:D3650)

Change History (3)

comment:1 by Freagarach, 3 years ago

In 24977:

Let entities garrison using cmpGarrisonable.

Followup to r24957 / rP24957.
Moves the logic for garrisoning from cmpGarrisonHolder to the entity that is being garrisoned.
Also fixes https://wildfiregames.com/forum/topic/36863-teleportation-feature-in-a24/?do=findComment&comment=418441 while at it (setting garrisoned before transferring orders on transform).

Differential revision: D3280
Refs: #5906
Comments by: @Stan, @wraitii

comment:2 by Freagarach, 3 years ago

In 25019:

Ungarrison entities using cmpGarrisonable.

Follow-up to r24977 / rP24977.
This moves responsibilities even further to the garrisoning entity.

Fixes the garrison flag when renaming entities cannot garrison (#5906).
Allows easy fixing of #6087.

Ticket: #6081
Differential revision: D3628
Comments by: @Stan, @wraitii (also in length on IRC)

comment:3 by Freagarach, 3 years ago

Description: modified (diff)
Milestone: BacklogAlpha 25
Owner: set to Freagarach
Note: See TracTickets for help on using tickets.