src/station.cpp
changeset 7967 7a931c848b69
parent 7965 c1a170885a60
child 7992 8ac3fcd8d570
equal deleted inserted replaced
7966:24f03a15d679 7967:7a931c848b69
   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;