CleverRaven/Cataclysm-DDA

DANGEROUS_PROXIMITY distance not always honored (save included)

Open

#64.033 aperta il 7 mar 2023

Vedi su GitHub
 (8 commenti) (1 reazione) (0 assegnatari)C++ (3991 fork)batch import
<Bug>Help Wanted[C++]

Metriche repository

Star
 (9264 star)
Metriche merge PR
 (Merge medio 6g 5h) (292 PR mergiate in 30 g)

Descrizione

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:

  1. hit | (wait) then w wait a while then choose wait 1 minute at least
    
  2. Popup window: "Police bot spotted" answer I (ignore)
    
  3. Popup window: "The police bot is dangerously close" answer Y to cancel waiting
    
  4. 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

Guida contributor