src/yapf/yapf_node_rail.hpp
changeset 10104 fb4346183ffe
parent 9899 03a2d32a2c05
equal deleted inserted replaced
10103:ad05ade1f2c4 10104:fb4346183ffe
   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