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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Railtype flags to allow/disallow 90 degree curves. #7352

Merged
merged 1 commit into from Mar 10, 2019

Conversation

michicc
Copy link
Member

@michicc michicc commented Mar 9, 2019

Somebody apparently already declared it official; I guess I better PR it 馃槂

This PR allows optional NewGRF control over the state of 90 deg curves. Narrow gauge might always allow it while high-speed might never allow it, or something like that.

PeterN
PeterN previously approved these changes Mar 9, 2019
nielsmh
nielsmh previously requested changes Mar 9, 2019
* @param def Default value to use if the rail type doesn't specify anything.
* @return True if 90 degree turns are allowed between the two rail types.
*/
static inline bool Rail90DegTurnDisallowed(RailType rt1, RailType rt2, bool def = _settings_game.pf.forbid_90_deg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Function name says "disallowed", but doc comment says it returns true if the turn is allowed. Negative bool variables/functions are confusing in general, try to make it positive.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, comment is wrong, function is right.

@PeterN PeterN merged commit cc5f175 into OpenTTD:master Mar 10, 2019
@michicc michicc deleted the pr/railtype_90deg branch March 10, 2019 10:15
nielsmh pushed a commit to nielsmh/OpenTTD that referenced this pull request Mar 11, 2019
douiwby pushed a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants