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

UI issue during enemies turn probably related to reachmap #2197

Open
gfgtdf opened this issue Nov 14, 2017 · 6 comments
Open

UI issue during enemies turn probably related to reachmap #2197

gfgtdf opened this issue Nov 14, 2017 · 6 comments
Assignees
Labels
Bug Issues involving unexpected behavior. UI User interface issues, including both back-end and front-end issues.

Comments

@gfgtdf
Copy link
Contributor

gfgtdf commented Nov 14, 2017

during the enemies turn it often looks like this, to repdoruce it seems to be requires that you clicked one of your won units shortly before the enemies turn began.

grafik

@gfgtdf gfgtdf changed the title UI issue during enemies turn probably related to show visible moves UI issue during enemies turn probably related to reachmap Nov 14, 2017
@gfgtdf
Copy link
Contributor Author

gfgtdf commented Nov 14, 2017

if you turn down accelerated sppeed really slow you can reproduce it better, you also need 'follow unit actions' activated: whiel the screen scrolls to the enemies leader the whole maps becomed covered with a reachmap overlay. (that doesn't disappear properly after the scrolling has finished)

@gfgtdf
Copy link
Contributor Author

gfgtdf commented Nov 14, 2017

ok i looked a bit at the code and what i think i happening is:

  1. The (ai) turn of side 2 starts, this changes the cursor at https://github.com/wesnoth/wesnoth/blob/1.13.10/src/playsingle_controller.cpp#L539

  2. The user click on the map this sets display::reach_map_

  3. during th ais turn the reach_map has no effect sicne it's blocked by https://github.com/wesnoth/wesnoth/blob/1.13.10/src/game_display.cpp#L278

  4. When scrolling to side 3s leader, which happens "between" the turns, https://github.com/wesnoth/wesnoth/blob/1.13.10/src/game_display.cpp#L278 no longer blocks so the map is drawn with unreachable overlay on it.

  5. back inside side 3's turn no hexes are invalidated since reach_map hasn't changed but tzhe overlay is not darwn for new hexes resuling in artifacts.

For now imm assignig tis to @AI0867 who made 38e9c55 which changes the appearanc of hexes ithout invalidating them. thi part coudl maybe be fixed by making all cursor changes call display::invalidate_all

But i also think that the fact that the reach map is shown while the map scrolls to the leader is somethign unexpected, and should be corrected.

@gfgtdf gfgtdf added Bug Issues involving unexpected behavior. UI User interface issues, including both back-end and front-end issues. labels Nov 14, 2017
@AI0867
Copy link
Member

AI0867 commented Nov 14, 2017

Okay, so I gather that the problem is that between AI turns, the reachmap is drawn, and then left there during the latter AI turn.

Looking at the original requirements in GNA #16350, depending on the cursor seems a bit of a hack. Also, the reachmap (among other things) should probably be cleared when we enter such a state.

@sevu
Copy link
Member

sevu commented Aug 3, 2018

I could reproduce this issue another way:
In TSG S4, when the first time a unit dies, a message is shown.
If I have this unit selected during the AI fighting it, it looks like this:
strange marks

@sevu
Copy link
Member

sevu commented Jun 21, 2019

Can reproduce it with the fix and the above.

@sevu
Copy link
Member

sevu commented Jun 21, 2019

For the TSG test case: works best if I keep clicking the unit while the fight, until the [message] appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. UI User interface issues, including both back-end and front-end issues.
Projects
None yet
Development

No branches or pull requests

3 participants