#4297 closed defect (fixed)
[PATCH] Miraging is broken for certain entities the first time the mirage appears
Reported by: | wraitii | Owned by: | wraitii |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 22 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
It seems for resources for example Miring is behaving quite erratically.
To reproduce:
Load a new map, task some units to check out an unknown tree somewhere. Order them to gather from it. Select it before they start gathering. Once they start gathering you should be switched over to the mirage. Order them away so that the tree becomes fogged. Select the tree. Once it goes fogged you should lose selection focus and click on the tree: the mirage will still show full resources.
Attachments (2)
Change History (9)
by , 7 years ago
Attachment: | tentativeFix.patch added |
---|
follow-up: 2 comment:1 by , 7 years ago
comment:2 by , 7 years ago
Keywords: | review removed |
---|---|
Milestone: | Alpha 21 → Alpha 22 |
Priority: | Release Blocker → Must Have |
There is, indeed, something to change line 38, but your change is wrong here: this.miraged
is true when there is a mirage loaded, but that never happened before because the component used to be deactivated (we're in the middle of Activate
). The actual fix would be checking whether the visibility is "fogged", and if yes create the mirage - else the component will be only activated and the proper miraging will happen later.
This would be enough to fix the issue(s) you describe in this ticket.
Your second change doesn't make sense (there is no early return so you're just loading a mirage in all situations !) - but to answer your question above, no the code is right here. This is how it works: the entity falls into the FoW. The range manager triggers a visibility change, from "visible" to "fogged". In that case, and only if the component is activated, a mirage is loaded. When this mirage is finally loaded, the visibility of the actual entity will become "hidden" and you will only see the mirage, which will be "fogged".
becomes hidden rather than invisible
You seem to be confused: "visible" and "fogged" make the entity visible, "hidden" makes it invisible.
by , 7 years ago
Attachment: | fixv0.patch added |
---|
comment:4 by , 7 years ago
Keywords: | rfc added |
---|
comment:7 by , 7 years ago
Keywords: | rfc removed |
---|---|
Milestone: | Work In Progress → Alpha 22 |
Patch: Do not create a mirage for an entity that is currently visible. Do update the mirage if the entity becomes hidden rather than invisible, because mirage entities going in the FOW become hidden (I think - ITMS?)