CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10k stars 4.09k forks source link

NPC's running through closed doors and being attacked across z-levels. #53592

Open Techmind opened 2 years ago

Techmind commented 2 years ago

Describe the bug

NPC's are broken they get attacked thought z-levels and will run through closed doors. I also had a similar message with npc being underground (-1 level) and it was attacked by ant from "0-level" i think a few hundred turns before.

Steps to reproduce

Google drive link to save: https://drive.google.com/file/d/19xG0Yq0MfjPzj0h42GWBSnbPiGRJQ7dC/view?usp=sharing Probably has something to do with latest experimental versions there is couple of bugs: A) if you open the door and lead ants to nps they will attack them, debug message with " DEBUG : Z-Level view violation: the ant tried to attack Charlotte Hall.

FUNCTION : bool monster::melee_attack(Creature&, float) FILE : src/monster.cpp LINE : 1593 VERSION : 9da956a"

appers and npc disappears.

B) If you don't open the door and wait for a few turns NPCS will run through door without opening it

Expected behavior

Npc opening doors and not disappearing.

Screenshots

image

Versions and configuration

Additional context

No response

hexagonrecursion commented 2 years ago

Confirmed using the save file you attached. Note: I do not have Arcana. The NPCs are hallucinations. This can be confirmed by viewing their @ status window via the cheat menu.

Might be related: #53243

Techmind commented 2 years ago

Ok, did not know i can halluciante NPCS, then i guess can be considered a "feature". Through debug message is a bit annoying.

hexagonrecursion commented 2 years ago

I have opened a separate bug for z-level assertions. This issue can be kept for discussion of what can be done about hallucinatory NPCs phasing through doors. As you have demonstrate this can cause player confusion. A possibly less confusing solution is for the NPCs to disappear right before they try to go through a door.

hexagonrecursion commented 2 years ago

Hallucinations in the attached save file still phase through closed doors even after #54307 was merged

The z level issue is partially fixed. More here: #54364

LeahLuong commented 2 years ago

@hexagonrecursion Regarding #54307, dseguin commented on Fris0uman''s comment in that thread:

Because if they can't open doors at all they'll stay stuck on the other side instead of following you.

It looks like that behaviour still works: Not sure if that's the way it's supposed to work, but the door remains closed.

If hallucinations are interacting w/ doors, they are having a physical impact in the game. Having them phase thru seems like the best solution for now.