equal
deleted
inserted
replaced
191 |
191 |
192 ft.Follow(cur, cur_td); |
192 ft.Follow(cur, cur_td); |
193 cur = ft.m_new_tile; |
193 cur = ft.m_new_tile; |
194 assert(KillFirstBit(ft.m_new_td_bits) == TRACKDIR_BIT_NONE); |
194 assert(KillFirstBit(ft.m_new_td_bits) == TRACKDIR_BIT_NONE); |
195 cur_td = FindFirstTrackdir(ft.m_new_td_bits); |
195 cur_td = FindFirstTrackdir(ft.m_new_td_bits); |
196 |
|
197 /* Did we skip tiles because of a station? */ |
|
198 if (ft.m_is_station && ft.m_tiles_skipped > 0) { |
|
199 TileIndexDiff diff = TileOffsByDiagDir(TrackdirToExitdir(cur_td)); |
|
200 TileIndex tile = TILE_ADD(cur, -diff * ft.m_tiles_skipped); |
|
201 |
|
202 /* Call func for all tiles in between. */ |
|
203 for (int i = 0; i < ft.m_tiles_skipped; ++i) { |
|
204 if (!(obj.*func)(tile, cur_td)) return false; |
|
205 tile = TILE_ADD(tile, diff); |
|
206 } |
|
207 } |
|
208 } |
196 } |
209 |
197 |
210 return (obj.*func)(cur, cur_td); |
198 return (obj.*func)(cur, cur_td); |
211 } |
199 } |
212 |
200 |