forked from mirror/OpenTTD
(svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate
This commit is contained in:
@@ -108,7 +108,7 @@ Station::~Station()
|
||||
* @param v the vehicle to get the first road stop for
|
||||
* @return the first roadstop that this vehicle can load at
|
||||
*/
|
||||
RoadStop *Station::GetPrimaryRoadStop(const Vehicle *v) const
|
||||
RoadStop *Station::GetPrimaryRoadStop(const RoadVehicle *v) const
|
||||
{
|
||||
RoadStop *rs = this->GetPrimaryRoadStop(IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? ROADSTOP_BUS : ROADSTOP_TRUCK);
|
||||
|
||||
@@ -459,7 +459,10 @@ RoadStop::~RoadStop()
|
||||
Vehicle *v;
|
||||
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == VEH_ROAD && v->u.road.slot == this) ClearSlot(v);
|
||||
if (v->type != VEH_ROAD) continue;
|
||||
RoadVehicle *rv = (RoadVehicle *)v;
|
||||
|
||||
if (rv->u.road.slot == this) ClearSlot(rv);
|
||||
}
|
||||
}
|
||||
assert(num_vehicles == 0);
|
||||
@@ -535,7 +538,7 @@ void RoadStop::SetEntranceBusy(bool busy)
|
||||
* @param v the vehicle to get the next road stop for.
|
||||
* @return the next road stop accessible.
|
||||
*/
|
||||
RoadStop *RoadStop::GetNextRoadStop(const Vehicle *v) const
|
||||
RoadStop *RoadStop::GetNextRoadStop(const RoadVehicle *v) const
|
||||
{
|
||||
for (RoadStop *rs = this->next; rs != NULL; rs = rs->next) {
|
||||
/* The vehicle cannot go to this roadstop (different roadtype) */
|
||||
|
Reference in New Issue
Block a user