DANGEROUS_PROXIMITY distance not always honored (save included)
#64,033 opened on Mar 7, 2023
Repository metrics
- Stars
- (9,264 stars)
- PR merge metrics
- (Avg merge 6d 5h) (292 merged PRs in 30d)
Description
Describe the bug
Sometimes the dangerously close message happens too late after you hit I or N in the monster spotted dialog window, the Zed is in a nearby square.
From Originally posted by @Cenness in https://github.com/CleverRaven/Cataclysm-DDA/issues/63965#issuecomment-1455594230
static constexpr int DANGEROUS_PROXIMITY = 5;
it looks like the distance is hard coded at 5 at the moment but in the save attached, the monster ends at a distance of 1. (5 is fine btw).
Attach save file
Trimmed save Usher-trimmed.tar.gz
Full save in zip format is here (80MB) if the trimmed one does not work for you : https://1drv.ms/u/s!AgU0TIkDwXcdhI1fx9ARYGah1SudJw?e=sIMC0z
Steps to reproduce
Ok, I managed to reproduce it: In the save attached:
-
hit | (wait) then w wait a while then choose wait 1 minute at least -
Popup window: "Police bot spotted" answer I (ignore) -
Popup window: "The police bot is dangerously close" answer Y to cancel waiting -
the bot is in the adjacent square and NOT 5 squares away
Expected behavior
Player should be able to react when the monster crosses the DANGEROUS_PROXIMITY distance (5 atm) and NOT when the monster is 1 square away.
Screenshots
No response
Versions and configuration
- OS: Linux
- OS Version: LSB Version: core-11.1.0ubuntu4-noarch:printing-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch; Distributor ID: Ubuntu; Description: Ubuntu 22.04.2 LTS; Release: 22.04; Codename: jammy;
- Game Version: 7762a54 [64-bit]
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], No Fungal Growth [no_fungal_growth], Stats Through Skills [StatsThroughSkills], Alternative Map Key [alt_map_key], Bionic Professions [package_bionic_professions] ]
Additional context
No response