jaycewhite / MiniMappingway

MIT License
5 stars 7 forks source link

Adjust Visible flag check #23

Closed Scrxtchy closed 1 year ago

Scrxtchy commented 1 year ago

I referenced this in #17, however I believe I had extra code that was managing this as now I cannot replicate the function with the short sample I supplied. Having discarded that code entirely by accident, I have had to deal with making a new solution to this problem. I can't be very technical with this, the bitwise operation does things, but since I don't know what each flag is meant to represent, I've had to fly blind on this with the Data display.

Currently, the plugin will continue to render when the map is visible in some (but not all?) cutscenes. This might be more to do with the player being in an instanced area rather than a public space while doing so. It will also render when the minimap is toggled to be invisible on the hudlayout, this adds some complications I will explain.

Using /mmwaydebug allows us to give a state of whether anything will render or not, so it provides as a good test Here we can see that on this layout, the minimap is visible by it's visibility flag of 0 as well as the bool IsVisible of True image

However, for some reason to do with the upstream library into dalamud's clientstructs, when we hide the item from the layout, it's IsVisible state is still True, while the flag has been set to 1 image

The catch-22 of this is that even in cutscenes, the visibility flag is still set to 0, while IsVisible is False, however while testing I wasn't able to get it visible even when using the addon inspector to force it back on image

Even if this could be further improved with a better understanding of flags, I believe it's already in a state of being a significant improvement to this problem 23-01-24_01-44-26-FINAL_FANTASY_XIV

This would also fix #15

jaycewhite commented 1 year ago

Hi! Thanks for both the PRs, just getting time to look at them now! I'm unable to replicate this, is there a particular cutscene or way of making it happen? I ran through the vault unsynced, spoke to the wandering minstrel, and watch some cutscenes at the inn and none of them caused it. Happy to still merge this in after some testing if you think its an improvement, but I'd prefer to be able to see what it fixes first! Thanks again!

jaycewhite commented 1 year ago

Hi again!

I've tested this, and at the very least it doesn't seem to cause a regression in hiding the plugin at the appropiate times, even if I can't test the bug specifically. I'll merge this because I work on this plugin much more sporadically nowadays, but if you could comment how I can reproduce it at some point, I'll retest then as well. Might as well get this fix into the next release though!

Thanks again!

Scrxtchy commented 1 year ago

I'm unable to replicate this, is there a particular cutscene or way of making it happen?

Outside of the procedures I took in the OP, I can't think of anything that helps test this. Unless there's something we're missing that's differing from systems, I wouldn't be too sure. I can't imagine this could differ across game themes, of which at the time of writing I would have used Clear Blue, but I used Classic FF in the past when first investigating this issue several months ago.

I think if there's one way to try and figure this out, it would be to try and see on my system what conditions are applied for the plugin to behave as expected from the version pre-merge, and how it differs to what I was have been playing/testing on

jaycewhite commented 1 year ago

Hmm, if this fixes the issue for you, and it doesn't create any regressions/bugs (which it doesn't seem to in my testing), I'm happy to leave this merged and just be happy for the help lol. No point spending ages trying to reproduce something thats already been fixed, I was only going to check if it was easy to do! Thanks again, both your fixes are in the pipeline to be released, they just need to be approved etc, and I've credited you (just as Scrxtchy) in the update notes!