mirror of https://github.com/OpenTTD/OpenTTD
(svn r26117) -Cleanup: unneeded NULL check
parent
04e97a0bec
commit
f669101560
|
@ -167,7 +167,7 @@ public:
|
||||||
/* base tile cost depending on distance */
|
/* base tile cost depending on distance */
|
||||||
int c = IsDiagonalTrackdir(n.GetTrackdir()) ? YAPF_TILE_LENGTH : YAPF_TILE_CORNER_LENGTH;
|
int c = IsDiagonalTrackdir(n.GetTrackdir()) ? YAPF_TILE_LENGTH : YAPF_TILE_CORNER_LENGTH;
|
||||||
/* additional penalty for curves */
|
/* additional penalty for curves */
|
||||||
if (n.m_parent != NULL && n.GetTrackdir() != NextTrackdir(n.m_parent->GetTrackdir())) {
|
if (n.GetTrackdir() != NextTrackdir(n.m_parent->GetTrackdir())) {
|
||||||
/* new trackdir does not match the next one when going straight */
|
/* new trackdir does not match the next one when going straight */
|
||||||
c += YAPF_TILE_LENGTH;
|
c += YAPF_TILE_LENGTH;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue