1489 RoadDriveEntry rd; |
1489 RoadDriveEntry rd; |
1490 int x,y; |
1490 int x,y; |
1491 uint32 r; |
1491 uint32 r; |
1492 |
1492 |
1493 if (v->u.road.overtaking != 0) { |
1493 if (v->u.road.overtaking != 0) { |
1494 if (++v->u.road.overtaking_ctr >= 35) |
1494 if (IsTileType(v->tile, MP_STATION)) { |
|
1495 /* Force us to be not overtaking! */ |
|
1496 v->u.road.overtaking = 0; |
|
1497 } else if (++v->u.road.overtaking_ctr >= 35) { |
1495 /* If overtaking just aborts at a random moment, we can have a out-of-bound problem, |
1498 /* If overtaking just aborts at a random moment, we can have a out-of-bound problem, |
1496 * if the vehicle started a corner. To protect that, only allow an abort of |
1499 * if the vehicle started a corner. To protect that, only allow an abort of |
1497 * overtake if we are on straight roads */ |
1500 * overtake if we are on straight roads */ |
1498 if (v->u.road.state < RVSB_IN_ROAD_STOP && IsStraightRoadTrackdir((Trackdir)v->u.road.state)) { |
1501 if (v->u.road.state < RVSB_IN_ROAD_STOP && IsStraightRoadTrackdir((Trackdir)v->u.road.state)) { |
1499 v->u.road.overtaking = 0; |
1502 v->u.road.overtaking = 0; |
1500 } |
1503 } |
|
1504 } |
1501 } |
1505 } |
1502 |
1506 |
1503 /* If this vehicle is in a depot and we've reached this point it must be |
1507 /* If this vehicle is in a depot and we've reached this point it must be |
1504 * one of the articulated parts. It will stay in the depot until activated |
1508 * one of the articulated parts. It will stay in the depot until activated |
1505 * by the previous vehicle in the chain when it gets to the right place. */ |
1509 * by the previous vehicle in the chain when it gets to the right place. */ |