CleverRaven/Cataclysm-DDA

DANGEROUS_PROXIMITY distance not always honored (save included)

Open

#64,033 创建于 2023年3月7日

在 GitHub 查看
 (8 评论) (1 反应) (0 负责人)C++ (3,991 fork)batch import
<Bug>Help Wanted[C++]

仓库指标

Star
 (9,264 star)
PR 合并指标
 (平均合并 6天 5小时) (30 天内合并 292 个 PR)

描述

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

贡献者指南