CleverRaven / Cataclysm-DDA

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

Peeking down stairs sometimes peeks to a different room than the stairs #49162

Closed Psiclops closed 2 years ago

Psiclops commented 3 years ago

The problem: When peeking downstairs, you can sometimes view a different room than the one the stairs are actually in. I've had this problem occur mostly in science labs.

When it occurs, it is repeatable multiple times 100%. Climb down and you go to the actual stairs, climb back up and peek and you look at a different room entirely. Try it on both stairs in a two stair set, both peeks lead to the same spot in a different room. Climbing down both stairs leads correctly to the actual stairs on the lower floor.

Psiclops commented 3 years ago

I've also just had the same problem occur peeking UP stairs. Peek goes to a specific point in the room that is not near the stairs, and in this case is physically not observable from the square the real stairs are on. Same general room, different location.

natsirt721 commented 3 years ago

In the early days of Z-levels, the mapgen code didn't require to you place staircases in the exact same spot on both floors. Going up or down stairs could translate you slightly within the tile. There was a worldgen option to force staircase alignment but it was pretty janky and would sometimes put staircases in the middle of walls or other nonsensical places. Anyway, not sure if that is still a thing or not, but it sounds similar to what you're experiencing. I'm guessing that if it is still a thing, then you're actually being translated slightly when you go up or down stairs still, but the peek down command just moves your cursor down one z level - hence the offset.

mft-dev commented 3 years ago

I've seen this happen in lab starts quite a bit the last few days.

OliveChukar commented 3 years ago

I have seen this most often with places that have multiple sets of stairs on one overmap tile. In subway stations I will often end up looking down a stairway on the opposite side of the building from where I am standing. When I stop peaking I am transported instantly to a different stairway.

Psiclops commented 3 years ago

That may be a different issue. In these cases, there was just one set of stairs in the map tile, and the peek was going to a spot with no stairs.

esotericist commented 3 years ago

the old labs are slated for replacement for this and other reasons

this isn't a "bug" in the usual sense. it's old dated content, and there are already plans and preliminary effort to replace it

at some point, possibly around the time #41758 is happening, possibly some other time, we can get rid of the teleporting stair logic entirely and start erroring on content that has stairs defined misaligned.

esotericist commented 3 years ago

I wanted to close this in favor of the older issue I was certain we have, but it doesn't seem to exist.

lfaga commented 3 years ago

This is still broken at this time (build 2021-06-14-0542) and its not only broken at the "old labs", research facilities, prisons, ALL labs are broken. This bug makes it almost unplayable 'cos you cant see where are you going when taking a stair (peeking shows you the wrong room or nothing at all), probably entering a room that will kill you. I love lab starts and this bug is game breaking for me.

Zeropol commented 3 years ago

Does this happen before #49014 ? It may need to be reverted if it introduced this bug.

lfaga commented 3 years ago

I had to revert to build 11581 to avoid this bug.

actual-nh commented 3 years ago

Long-term removed because, if you can fix it via reverting to a prior build, and the content in question hasn't been touched, it's not a content problem.

anothersimulacrum commented 3 years ago

I think long-term is still valid because the fundamental issue is that stairs do not align, and in the long term, that shouldn't happen. So while we can apply a patch in the short term to fix a visible symptom of that behavior, it does not fix the behavior.

GGgatherer commented 3 years ago

This is still broken at this time (build 2021-06-14-0542) and its not only broken at the "old labs", research facilities, prisons, ALL labs are broken.

Even lab towers are broken, just had this happen yesterday on multiple floors of the same tower.

dranitski commented 3 years ago

I have another case for that issue - once Ive faced a military bunker but lacked tools to hack the front door. I have constructed a downstair (with pickaxe) to visit the bunker and when I was peeking down my self-built downstairs, the game showed me like I was peeking from the main bunker downstairs. Also the game did not allowed me to go up through the main bunker underground upstairs, always throwing me out of the bunker like if I was traveled up via my upstairs. So that issue is not about peeking, but about moving via stairs down and up as well

wapcaplet commented 2 years ago

This issue has come up so many times in the form of duplicates, I just wanted to link all the ones I know of here, since this issue was the first.

sulyi commented 2 years ago

This also effects path finding, light, etc. which still remain.

There's a consequence solving this long term is by reworking map generation.