Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouseover hidden.png leaks information #4497

jostephd opened this issue Oct 21, 2019 · 2 comments


Copy link

@jostephd jostephd commented Oct 21, 2019

Describe the bug
The indication of [hides] ability being active in the mouseover hex, when that hex is fogged, leaks information.

To Reproduce
See #4462 (comment). Apply the patch from that comment (in the spoiler), start wesnoth -t, select (click) the Lich or Ancient Lich, and mouseover (36,1). That hex shows hidden.png, as the screenshot in 4462 shows. The ability would be active in that hex because it's adjacent to a side 3 unit, but that unit is fogged so the player shouldn't be shown hidden.png.

Expected behavior
Not show hidden.png in the mouseover hex.

In #4462 (comment)

System (please complete the following information):
1.15.1+dev linux

Additional context
Probably this:

if (w->second.invisible) {
drawing_buffer_add(LAYER_MOVE_INFO, loc, xpos, ypos,
image::get_image("misc/hidden.png", image::SCALED_TO_HEX));


This comment has been minimized.

Copy link

@blaf blaf commented Oct 27, 2019

I narrowed the issue down to

!unit_filter(vconfig(afilter)).set_use_flat_tod(illuminates).matches(*this, loc)

inside unit::ability_active.

When ability_active is called from ability_tooltips, it works just fine for fogged units. If it is called from unit::invisible through get_ability_bool, it reveals the hidden information.
The line mentioned above gives different boolean value for the two cases.


This comment has been minimized.

Copy link

@CelticMinstrel CelticMinstrel commented Nov 1, 2019

This is likely something to do with the abilities context thing? That sets up the context for any queries about abilities, so perhaps unit::invisible just needs to be sure to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.