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

Invalidate tow data on both vehicles on car crash #46539

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

BrettDong
Copy link
Member

Summary

SUMMARY: Bugfixes "Fix error message on towed vehicle crashed with towing vehicle"

Purpose of change

Fix #46517.

Describe the solution

Invalidate tow data on both vehicles.

Describe alternatives you've considered

None.

Testing

Follow the steps to reproduce #46517:

  1. Spawn a heavy duty cargo truck
  2. Spawn a Beetle behind
  3. Spawn a heavy duty tow cable
  4. Link two vehicles with tow cable
  5. Drive cargo truck, speed up to 64 km/h, drive for a little while so Beetle also gains the speed
  6. Suddenly decrease target speed to -64 km/h
  7. Observe cargo truck slows down in a sudden and Beetle collides with cargo truck

Observe that

  1. There is no longer error message popping up
  2. Two vehicles are decoupled
  3. Both vehicles can be towed again

Additional context

@mlangsdorf Is this the right fix?

@BrettDong BrettDong 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) labels Jan 4, 2021
Copy link
Contributor

@mlangsdorf mlangsdorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking this down.

@ZhilkinSerg ZhilkinSerg merged commit 78e42d3 into CleverRaven:master Jan 4, 2021
@BrettDong BrettDong deleted the tow branch January 5, 2021 09:36
VuradoZ referenced this pull request in VuradoZ/Cataclysm-BN Apr 11, 2021
Invalidate tow data on both vehicles on car crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message on towed vehicle rammed with tower vehicle on sudden brake
3 participants