CleverRaven / Cataclysm-DDA

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

Ascending bridge ramp while steering ate a tile of my car. #42733

Open Swootch opened 4 years ago

Swootch commented 4 years ago

Describe the bug

I drove up a bridge ramp at a 45° and tried to straighten out as my car was about halfway up, but my car collided with something and couldn't align itself with the bridge until it was all the way up. A few turns after that I noticed that an entire tile of my car was missing. Every tile of the car was equipped with military composite armor, no debris, the tile just vanished without a trace.

However when I inspected the vehicle with (e), the missing tile is still in that menu.

Steps To Reproduce

  1. Drive up a bridge at an angle.
  2. Turn while half the vehicle is halfway up (there will be a collision).
  3. Vehicle tile goes missing.

Expected behavior

Bridges don't eat cars.

Screenshots

The missing tile: Untitled2

The missing tile still present when inspecting the vehicle: Untitled33

Versions and configuration

Additional context

I can walk through the tile like it doesn't exist, even though the inspection menu says it's still.

The save file: Echoes of Darkness.zip

anothersimulacrum commented 4 years ago

If you drive your car off of the bridge, does it appear? It may not have ascended.

Swootch commented 4 years ago

Yes, I left the bridge and the tile reappeared. Damn that scared me.

ZhilkinSerg commented 4 years ago

Vehicles are 3D now, so missing parts are usually just hanging one z-level above ground level now.

wapcaplet commented 4 years ago

Confirmed in 0.E-5296-g a883429bdd

This seems a little easier to reproduce with a larger vehicle, like a Humvee (5x7 tiles) but I was able to reproduce it using a City Car (4x4) as well. It took several tries, going up and down the ramp at various angles, but I lost not just 1 but 9 tiles of the vehicle:

image

The missing tiles persist through a save and load; here is my save game with the disintegrated Humvee: broken-humvee.zip

Driving back down the ramp allows the vehicle parts to be restored.

Aivean commented 4 years ago

Might be related? #44534

mlangsdorf commented 3 years ago

45726 didn't fix the issue. I think what is happening is that turning from 60 degrees to 45 degrees (ie, past a sheer point) causes the relevant vehicle tiles to next enter the ramp properly, and so they never move up the ramp. That's why the issue persists across a save and reload; the relevant tiles are actually at a lower z-level.

I'm pondering how to fix it but I think the code that auto-levels a vehicle that partially drives off a ramp might be the solution.

mlangsdorf commented 3 years ago

It would probably be simpler to just disallowing turning while a vehicle is on ramps. The logic for determining that part of a vehicle is incorrectly below a surface is kind of complex.

KorGgenT commented 3 years ago

image yup the last piece of the vehicle is indeed underneath. i'm not familiar enough with vehicles to do it myself quickly but the band-aid to disallow turning sounds pretty nice to me, since we haven't had any movement on this issue in a few months

actual-nh commented 3 years ago

Given #47236, should this be moved to "Delayed Blockers for 0.G"?

kevingranade commented 3 years ago

Yep, thanks for the reminder.