Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

#80109 creates alert spam when riding a horse

Open SurFlurer opened this issue 7 months ago • 6 comments

Describe the bug

#80109 adds a check that shows "you suddenly feel alerted!". When I'm riding a horse, the alert clutters backlog and prevents auto-travel.

Attach save file

testchurn-trimmed.tar.gz

Steps to reproduce

Load the save, and walk around on the horse.

Expected behavior

To be able to auto-travel, and not see that alert when no real threat is posed.

Screenshots

Image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.5247 (22H2)
  • Game Version: cdda-experimental-2025-04-24-0846 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms] ]

Additional context

CC: @Kray4000

SurFlurer avatar Apr 25 '25 11:04 SurFlurer

I'll check it today(next 8-10 hours). I writed perk for mod, and can see that you haven't use it, so it seems core hard code problem.

Kray4000 avatar Apr 25 '25 12:04 Kray4000

/confirmed I reproduced problem. bio_alarm scream if you just get on a horse or mech. And it work when you have no any bionic or perk.

Image

Kray4000 avatar Apr 25 '25 15:04 Kray4000

Hey i got same error, posted this on reddit already thought i missing something, but now im aware thats a bug

Image

If you would need save i could post it too.

Wojciech79 avatar Apr 25 '25 17:04 Wojciech79

Hi @Kray4000 just so you're aware, you need to add yourself to the comment commands list to use those slash commands. No other requirements really, just open a PR and put your name on there.

I'm going to go ahead and mark this confirmed for you.

RenechCDDA avatar Apr 25 '25 22:04 RenechCDDA

Inside the 'src/do_turn.cpp' file, I tried to modify this check (line 332 in master branch): if( !critter.is_dead() && !critter.is_hallucination() &&

with this: if( critter.friendly == 0 && !critter.is_dead() && !critter.is_hallucination() &&

I'm not a contributor nor a coder, so I'm only offering my poor and lousy two cents, and I apologize in advance.

For now, I'm playing/testing the game with both overmap fast travel and local auto travel mode, and didn't find any issue yet.

Bye!

afirpo avatar Jun 02 '25 00:06 afirpo

nah, the actual solution is not to exclude friendly critters, but in https://github.com/CleverRaven/Cataclysm-DDA/blob/c6988fc9221393af5c32f7b3985b079c04f9f56a/src/do_turn.cpp#L333-L334 replace <= with <, so in case if the creature is 0 distance from you (the one you ride), and your motion alarm enchantment is 0 (ie no enchantment), it would return not 0 <= 0 (true), but 0 < 0 (false)

GuardianDll avatar Jun 15 '25 10:06 GuardianDll

Great solution indeed, @GuardianDll ! Managed to teach me something good. Thanks very much for that.

afirpo avatar Jun 21 '25 19:06 afirpo