Loading

Paste #pyhskff6t

  1. Index: src/roadveh_cmd.cpp
  2. ===================================================================
  3. --- src/roadveh_cmd.cpp (revision 27189)
  4. +++ src/roadveh_cmd.cpp (working copy)
  5. @@ -824,8 +824,9 @@
  6.     if (v->state >= RVSB_IN_ROAD_STOP || !IsStraightRoadTrackdir((Trackdir)(v->state & RVSB_TRACKDIR_MASK))) return;
  7.  
  8.     /* Can't overtake a vehicle that is moving faster than us. If the vehicle in front is
  9. -    * accelerating, take the maximum speed for the comparison, else the current speed. */
  10. -   int u_speed = u->GetAcceleration() > 0 ? u->GetCurrentMaxSpeed() : u->cur_speed;
  11. +    * accelerating, take the maximum speed for the comparison, else the current speed.
  12. +    * Original acceleration always accelerates, so always use the maximum speed. */
  13. +   int u_speed = (_settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL || u->GetAcceleration() > 0) ? u->GetCurrentMaxSpeed() : u->cur_speed;
  14.     if (u_speed >= v->GetCurrentMaxSpeed() &&
  15.             !(u->vehstatus & VS_STOPPED) &&
  16.             u->cur_speed != 0) {
  17.  

Comments