CleverRaven / Cataclysm-DDA

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

Floating rain gutter/ceiling tiles after a building is burned down #77590

Open Maarifrah opened 1 day ago

Maarifrah commented 1 day ago

Describe the bug

When burning down a building, sometimes ceiling tiles that have rain gutters on them don't collapse, even if they have no support. Observed behavior is that ceiling tiles without rain gutters on them consistently collapse without support, but it's not consistent if the ceiling tile has rain gutters.

Attach save file

test-trimmed.tar.gz

Steps to reproduce

(In the save provided, the building to the right has already been set on fire and you only need to wait).

  1. Set a wooden building on fire. Try to choose one that will fully burn down on all sides, leaving no standing structural elements that can support a ceiling.
  2. Wait until the fire burns out.
  3. Check the remaining ceiling tiles to see which ones are left floating in the air without any support.

Expected behavior

No remaining ceiling/rain gutter tiles after a building has completely burned down as there is nothing that can support them.

Screenshots

XqKUjVN qdR28vh

Versions and configuration

Additional context

I know that there are some supporting tiles in the screenshot I provided, but I tested this with a different building that burned down completely (all tiles on the ground floor) and got similar results. Also note how there are treetops but no trees underneath them.

PatrikLundell commented 1 day ago

/Confirmed

The save supplied doesn't seem to have any relation to the images posted. It loads with the PC standing on a roof, with no obvious burned buildings in the vicinity.

Edit: There are two reasons treetops remain:

The gutter issue is trickier, and probably can't be solved completely with the current logic for support (and the code has a comment the current implementation still has issues, but is better than it was earlier than that). It's partially an illusion, in that roofs of wooden buildings typically burn, and so disappear due to fire, rather than collapse, while gutters don't burn, and thus disappear only due to collapse. However, it seems the collapse_check leaves a bit to be desired, because the probability of collapse depends on support that may come solely from surrounding tiles that "support" each other mutually, while none of them actually is supported from below. There's also a bit of a cascading effect in that if one tile manages to stay intact when the supporting wall somewhere beneath disappears it will help the others to remain, while if the first one falls it's more likely further tiles will as well.

Maarifrah commented 21 hours ago

Yes, I should have clarified that about the screenshots. The screenshots are from a separate save that I felt illustrated the bug more clearly. Instead of including that one, I wanted to provide a save that would include the process of the building burning down in the event that it was relevant.

To that effect, the save provided has a building to the right that is in the process of being burned down.