CleverRaven / Cataclysm-DDA

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

Bike racks causing vehicle tiles to merge #60453

Closed DPavonis closed 2 years ago

DPavonis commented 2 years ago

Describe the bug

On a two tile vehicle, with bike racks on both tiles and identically-named sub-vehicles loaded on both racks, attempting to unload one of the sub-vehicles will cause it to merge with the other

Steps to reproduce

1.) Have a two tile vehicle with bike racks on each tile 2.) Create two sub-vehicles and name them identically 3.) Load both sub-vehicles onto a rack 4.) Attempt to unload a vehicle from the rack

Expected behavior

That the sub-vehicles not re-enact Jeff Goldblum's role in The Fly.

Screenshots

No response

Versions and configuration

Additional context

Here is a video demonstrating the bug in action: https://www.youtube.com/watch?v=Toim8dtdvWU

Attached save has a vehicle ready to demonstrate the bug; simply attempt to unload a vehicle from either rack:

two_tile_vehicle_bike_rack_bug_demonstrator.zip

anothersimulacrum commented 2 years ago

CC @irwiss - I don't know if something you've done recently fixes this.

DPavonis commented 2 years ago

Bug is still present as of build 3d2829c-dirty [64-bit], will update the ticket with a link to a video demonstrating the bug once it's finished processing.

irwiss commented 2 years ago

I didn't dig too deep yet, but it looks to me like vehicle name is the only separator between vehicles if you rack a few of them side by side on the same rack https://github.com/CleverRaven/Cataclysm-DDA/blob/3d2829c8230ede7b009033ee50c1c32d13674465/src/vehicle_use.cpp#L2024

Likely related https://github.com/CleverRaven/Cataclysm-DDA/issues/52079