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

vehicles: align turn directions in increments of 15 degrees #26671

Merged
merged 1 commit into from
Nov 15, 2018

Conversation

mlangsdorf
Copy link
Contributor

@mlangsdorf mlangsdorf commented Nov 13, 2018

Summary

SUMMARY: Bugfixes "vehicles: align turn directions in increments of 15 degrees"

Purpose of change

Fixes #26549
Smooth a vehicle's turn direction to be in increments of 15 degrees.

Describe the solution

When updating a vehicle's turn direction, return an canonical turn direction that is the rounded direction in increments of 15 degrees.
Facing should eventually align with turn direction as the vehicle moves.

Describe alternatives you've considered

Storing the actual turn direction in increments of 1 degree but smooth it out for all uses is more complicated without making things better.

@mlangsdorf mlangsdorf 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 Nov 13, 2018
@ZhilkinSerg ZhilkinSerg self-assigned this Nov 14, 2018
Force turn directions to be smoothed into 15 degree increments.
@kevingranade kevingranade merged commit bec3a77 into CleverRaven:master Nov 15, 2018
@mlangsdorf mlangsdorf deleted the vehicle_turns branch November 15, 2018 12:42
@ZhilkinSerg ZhilkinSerg removed their assignment Nov 16, 2018
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.

'offset' cars cannot be driven straight if repaired
4 participants