src/station.cpp
changeset 7471 e7e359e79b6a
parent 7469 2c1dd5ce245d
child 7496 49cec492627b
equal deleted inserted replaced
7470:64e4df46490c 7471:e7e359e79b6a
   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;