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

Can't see fire reticule and can't fire gun. #45910

Closed
Lamandus opened this issue Dec 8, 2020 · 7 comments · Fixed by #45951
Closed

Can't see fire reticule and can't fire gun. #45910

Lamandus opened this issue Dec 8, 2020 · 7 comments · Fixed by #45951
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics

Comments

@Lamandus
Copy link
Contributor

Lamandus commented Dec 8, 2020

Describe the bug

When I use a weapon and want to fire it, no aiming reticule is showing, the enemy isn't aimed at and I can't even (blindly) aim at the enemy

Steps To Reproduce

Take a gun and try to shoot at something.

Expected behavior

Well, it should work like before!

Screenshots

grafik

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 2004
  • Game Version: 0.E-8092-g94044f1 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Dark Days of the Dead [classic_zombies],
    Nonperishable Overhaul [Nonperishable_Overhaul],
    meins [mine]
    ]

Additional context

@emptytriangle
Copy link

happening here too on latest experimental. I also noticed using < and > while aiming and 3d fov is enabled moves the (invisible) cursor up or down levels, but the view stays on the current level so you can't see where you're aiming there either

@anothersimulacrum anothersimulacrum added <Bug> This needs to be fixed Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics labels Dec 9, 2020
@emptytriangle
Copy link

it looks like a lot of other UI elements aren't being drawn also. When you use E to examine something, usually it shows a highlight reticule when there is more than one thing to examine. That's not being drawn. Also when you attack a zombie or get damaged you don't see attack or damage graphics or equipment damage indicators.

@Lamandus
Copy link
Contributor Author

Lamandus commented Dec 9, 2020

It worked with 11232. So #45815 is sus

@Zakzimus
Copy link

Zakzimus commented Dec 9, 2020

Yea, having the same issue with 'e' and aiming. The only reticule that shows up is when you use the 'x' look.

@anothersimulacrum
Copy link
Member

Lamandus is right, it's #45815
As for why, I'm not sure. Where the cursor ends up shouldn't have any effect, but apparently it does.

@anothersimulacrum
Copy link
Member

The problem lies somewhere on the SDL side (init_draw_cursor and whatever is done after that), it works fine in curses.

@anothersimulacrum
Copy link
Member

anothersimulacrum commented Dec 9, 2020

Someone should probably test that this works (I can't imagine it doesn't, but it's worth it to be cautious), however, this should solve it:

diff --git a/src/game.cpp b/src/game.cpp
index 981542c764..8ed047df2a 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -3595,12 +3595,16 @@ void game::draw()

     draw_panels( true );

+    // This breaks stuff in the SDL port, see
+    // https://github.com/CleverRaven/Cataclysm-DDA/issues/45910
+#if !defined(TILES)
     // Ensure that the cursor lands on the character when everything is drawn.
     // This allows screen readers to describe the area around the player, making it
     // much easier to play with them
     // (e.g. for blind players)
     wmove( w_terrain, -u.view_offset.xy() + point{POSX, POSY} );
     wnoutrefresh( w_terrain );
+#endif
 }

 void game::draw_panels( bool force_draw )

It effectively reverts #45815 for tiles builds.
Anyone is free to PR this, if not I'll do so in several hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants