equal
deleted
inserted
replaced
107 // additional penalty for curves |
107 // additional penalty for curves |
108 if (n.m_parent != NULL && n.GetTrackdir() != NextTrackdir(n.m_parent->GetTrackdir())) { |
108 if (n.m_parent != NULL && n.GetTrackdir() != NextTrackdir(n.m_parent->GetTrackdir())) { |
109 /* new trackdir does not match the next one when going straight */ |
109 /* new trackdir does not match the next one when going straight */ |
110 c += 10; |
110 c += 10; |
111 } |
111 } |
|
112 |
|
113 c += YAPF_TILE_LENGTH * tf->m_tiles_skipped; |
|
114 |
112 // apply it |
115 // apply it |
113 n.m_cost = n.m_parent->m_cost + c; |
116 n.m_cost = n.m_parent->m_cost + c; |
114 return true; |
117 return true; |
115 } |
118 } |
116 }; |
119 }; |