Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled towing over ramps #75346

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Conversation

PatrikLundell
Copy link
Contributor

@PatrikLundell PatrikLundell commented Jul 31, 2024

Summary

None

Purpose of change

Fix #75086, i.e. inability to tow vehicles over bridges.

Describe the solution

Simply remove the block of code that detaches the tow cable when an elevation difference is detected.

Describe alternatives you've considered

Testing

  • Spawn two vehicles near a bridge.

  • Hook them up with a tow cable.

  • Drive the towing vehicle over the bridge.

  • Verify the towed vehicle was towed both up the ramp to the bridge and down the ramp off it.

  • Teleport onto the roof of a farm supply building.

  • Smash the railing on one side.

  • Dismantle various stuff on the roof that was in the way.

  • Debug spawn two beetles, one in front of the other, and hook them up with a tow cable.

  • Accelerate the towing vehicle and try to jump out of it while in motion.

  • Fail to jump out before it runs off the edge of the roof.

  • See the character run/roll/whatever in the forward direction from the crashed vehicle's wreck, but somehow survive.

  • Teleport onto the roof.

  • See the towed vehicle stand still quite some distance from the edge of the roof.

  • Consider that an acceptable result. A (game) crash would not have been acceptable, while the towed vehicle following the tower over the edge would have been preferred.

  • Debug spawned a beetle beside a bridge and another on it.

  • Drove them into position so one was behind the other, with the tower on the bridge and the towee on the ground level.

  • Hooked up a tow cable between them

  • Towed up the ramp onto the bridge.

Additional context

The comment in the removed section of code indicates the author didn't think the code would actually be reached, and so would really be a fallback for "impossible" cases. @BrettDong amended the comment with a clarification that bridges (which I think were fairly recently converted from flat to having ramps by that time) would indeed be a legal case (the comment was made in conjunction with a bug fix for a crash relating to the cable snapping off from the "wrong" vehicle and the code crashing because that case wasn't handled).

In theory you'd now also be able to tow vehicles up from underground garages. I say "in theory" because I suspect there isn't enough room to align vehicles so they'd actually move up the ramp (vehicles needing to be towed typically can't be driven into a suitable position even if there is room behind the ramp).

@github-actions github-actions bot added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jul 31, 2024
@dseguin dseguin merged commit 35e37f3 into CleverRaven:master Aug 5, 2024
23 of 29 checks passed
@PatrikLundell PatrikLundell deleted the bridge_tow branch August 5, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restore towing over bridges.
2 participants