Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Problem
Diagonal roads/tram lines in the manner of which Simcity up til about SC3000 did them, simply two adjoining tiles with their own 45 degree straight angle
Description
extends table/roadveh_movement.h with additional movements for corners that just take a straight 45degree line to the next tile edge rather than the gradual cornering that vanilla takes. added checks to roadveh_cmd.cpp to allow using these movement sets if the parameter is set.
Limitations
At present it's either/or, you either pick the new movement method or you stick to the old one.
Requires appropriate .grf's for road sprites. I'm hoping to have some sprites to demonstrate this feature with soon.
Reveals a lot of inconsistencies with the | and -- views of road vehicle newgrf's as a lot use weird sprite offsets and not the vanilla ones. So-far Vanilla and Road Hog work well, HEQS fails due to oversized road vehicles. Ikarus bus set shows promise with its smaller scale but their | and -- orientations still require better offsets.
I have one outstanding crash; the disconnected road vehicles exception that occurs with articulated road vehicles. For some reason, articulated road vehicles 'tear' in half when performing these turns and produce the exception, however articulated trams are immune to this problem except in the below case of changing the setting during gameplay. At this point I cannot fathom why articulated road vehicles would behave any differently to articulated trams, as they're both using the exact same movement tables (it's just their U turn movement tables that differ).
I've also checked the edge case of turning the setting on and off during play and it doesn't appear to create any ill effect, except for producing the disconnecting road vehicle exception with Trams. This would be reasonable to block from changing once a game is in progress much like drive on road side setting but I'm not sure off the top of my head how to do that despite copying much of the settings and flags from the road side settings switch.
Road building tool needs a diagonal drag option. Not sure how to do this.
I haven't touched save/loading of settings yet.
Checklist for review