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

safemode doesn't work if compass is hidden #36236

Closed
ghost opened this issue Dec 18, 2019 · 1 comment · Fixed by #36322
Closed

safemode doesn't work if compass is hidden #36236

ghost opened this issue Dec 18, 2019 · 1 comment · Fixed by #36322
Labels
<Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code`

Comments

@ghost
Copy link

ghost commented Dec 18, 2019

safemode doesn't work if compass is hidden

with the new panel it is possible to hide compass, however if we do so the safemode is completely bypassed.

Steps To Reproduce

  • disable compass in the panel
  • try approaching monsters
  • confirm safemode does not warn and stop you.

Expected behavior

safemode should work wether compass is hidden or not in the panel

Versions and configuration

  • OS: arch linux
  • Game Version: 0.D-10453-g572b78f982
  • Graphics version: Tiles
  • Mods loaded: dda, graphical_overmap

Additional context

the function mon_info() in game.cpp could be divided in two separate functions.

  • one for allowing safemode to work (that should always be used)
  • one for drawing compass (only used if compass is enabled in panel)

there's a large block of continuous code in mon_info() that is responsible for the safemode check,
that large block can be easily extracted out of there and be inserted in a dedicated function.

@KorGgenT KorGgenT added <Bug> This needs to be fixed [C++] Changes (can be) made in C++. Previously named `Code` labels Dec 18, 2019
@Kilvoctu
Copy link
Contributor

This explains why my safemode hasn't worked in months. Have had my compass disabled for all that time. Turned it back on to test and indeed safemode worked,

kevingranade added a commit that referenced this issue Dec 30, 2019
Fixed `safemode doesn't work if compass is hidden #36236`
va5h added a commit to va5h/Cataclysm-DDA that referenced this issue Jan 28, 2020
Looks like CleverRaven#36322
(Fixed `safemode doesn't work if compass is hidden CleverRaven#36236`)
extracted update logic from mon_info()
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`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants