Codechange: Increase readability of track functions and pathfinders.

This commit is contained in:
J0anJosep
2018-04-29 12:23:01 +02:00
committed by frosch
parent 85ebe20a76
commit 31ac11bddb
8 changed files with 28 additions and 26 deletions

View File

@@ -104,7 +104,7 @@ public:
assert(IsValidTrackdir(td2));
int cost = 0;
if (TrackFollower::Allow90degTurns()
&& ((TrackdirToTrackdirBits(td2) & (TrackdirBits)TrackdirCrossesTrackdirs(td1)) != 0)) {
&& ((TrackdirToTrackdirBits(td2) & TrackdirCrossesTrackdirs(td1)) != TRACKDIR_BIT_NONE)) {
/* 90-deg curve penalty */
cost += Yapf().PfGetSettings().rail_curve90_penalty;
} else if (td2 != NextTrackdir(td1)) {