#2627 closed defect (fixed)
[PATCH] When garrisoning a hero, the selection ring is not cleared
Reported by: | mimo | Owned by: | Stan |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 18 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
The hero ring is not cleared when garrisoning it, so it stays at the last position occupied by the hero before being put out of world.
Attachments (5)
Change History (16)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Keywords: | review patch added |
---|---|
Owner: | set to |
Summary: | When garrisoning a hero, the selection ring is not cleared → [PATCH] When garrisoning a hero, the selection ring is not cleared |
comment:3 by , 9 years ago
cmpPositon
can be null
and you should verify that. (Not sure if this is the best place to handle this, but I haven't looked at that code for some time.
comment:5 by , 9 years ago
When you use it, but make sure to adjust the code in case it is null. (!cmpPosition || cmpPosition->IsInWorld())
comment:6 by , 9 years ago
Keywords: | review removed |
---|
Your patch should be made differently. Indeed, you can't request Position in Selectable's Init
because the order of component creation is unknown.
In my opinion, you should fix it that way: listen to PositionChanged messages and when you receive one, if the entity has a permanent selection ring, if it is in the world, display the overlay, else remove it.
Thanks for working on it :)
by , 9 years ago
comment:8 by , 9 years ago
Keywords: | review added |
---|
comment:10 by , 9 years ago
Keywords: | patch review removed |
---|---|
Milestone: | Backlog → Alpha 18 |
Thanks for the patch!
#2911 was a duplicate of this.