equal
deleted
inserted
replaced
2323 static void CheckNextTrainTile(Vehicle *v) |
2323 static void CheckNextTrainTile(Vehicle *v) |
2324 { |
2324 { |
2325 /* Don't do any look-ahead if path_backoff_interval is 255. */ |
2325 /* Don't do any look-ahead if path_backoff_interval is 255. */ |
2326 if (_settings_game.pf.path_backoff_interval == 255) return; |
2326 if (_settings_game.pf.path_backoff_interval == 255) return; |
2327 |
2327 |
2328 /* Exit if we reached our destination or are inside a depot. */ |
2328 /* Exit if we reached our destination depot or are inside a depot. */ |
2329 if ((v->tile == v->dest_tile && !v->current_order.IsType(OT_GOTO_STATION)) || v->u.rail.track & TRACK_BIT_DEPOT) return; |
2329 if ((v->tile == v->dest_tile && v->current_order.IsType(OT_GOTO_DEPOT)) || v->u.rail.track & TRACK_BIT_DEPOT) return; |
2330 /* Exit if we are on a station tile and are going to stop. */ |
2330 /* Exit if we are on a station tile and are going to stop. */ |
2331 if (IsRailwayStationTile(v->tile) && v->current_order.ShouldStopAtStation(v, GetStationIndex(v->tile))) return; |
2331 if (IsRailwayStationTile(v->tile) && v->current_order.ShouldStopAtStation(v, GetStationIndex(v->tile))) return; |
2332 /* Exit if the current order doesn't have a destination, but the train has orders. */ |
2332 /* Exit if the current order doesn't have a destination, but the train has orders. */ |
2333 if ((v->current_order.IsType(OT_NOTHING) || v->current_order.IsType(OT_LEAVESTATION)) && v->num_orders > 0) return; |
2333 if ((v->current_order.IsType(OT_NOTHING) || v->current_order.IsType(OT_LEAVESTATION)) && v->num_orders > 0) return; |
2334 |
2334 |