equal
deleted
inserted
replaced
513 */ |
513 */ |
514 RoadStop *RoadStop::GetNextRoadStop(const Vehicle *v) const |
514 RoadStop *RoadStop::GetNextRoadStop(const Vehicle *v) const |
515 { |
515 { |
516 for (RoadStop *rs = this->next; rs != NULL; rs = rs->next) { |
516 for (RoadStop *rs = this->next; rs != NULL; rs = rs->next) { |
517 /* The vehicle cannot go to this roadstop (different roadtype) */ |
517 /* The vehicle cannot go to this roadstop (different roadtype) */ |
518 if ((GetRoadTypes(rs->xy) & v->u.road.compatible_roadtypes) != ROADTYPES_NONE) continue; |
518 if ((GetRoadTypes(rs->xy) & v->u.road.compatible_roadtypes) == ROADTYPES_NONE) continue; |
519 /* The vehicle is articulated and can therefor not go the a standard road stop */ |
519 /* The vehicle is articulated and can therefor not go the a standard road stop */ |
520 if (IsStandardRoadStopTile(rs->xy) && RoadVehHasArticPart(v)) continue; |
520 if (IsStandardRoadStopTile(rs->xy) && RoadVehHasArticPart(v)) continue; |
521 |
521 |
522 /* The vehicle can actually go to this road stop. So, return it! */ |
522 /* The vehicle can actually go to this road stop. So, return it! */ |
523 return rs; |
523 return rs; |