Loading

Paste #pq65cf6fi

  1. Index: src/aircraft_cmd.cpp
  2. ===================================================================
  3. --- src/aircraft_cmd.cpp    (revision 27927)
  4. +++ src/aircraft_cmd.cpp    (working copy)
  5. @@ -634,6 +634,12 @@
  6.      * and take-off speeds being too low. */
  7.     speed_limit *= _settings_game.vehicle.plane_speed;
  8.  
  9. +   /* adjust speed for broken vehicles */
  10. +   if (v->vehstatus & VS_AIRCRAFT_BROKEN) {
  11. +       speed_limit = min(speed_limit, SPEED_LIMIT_BROKEN);
  12. +       hard_limit = false;
  13. +   }
  14. +
  15.     if (v->vcache.cached_max_speed < speed_limit) {
  16.         if (v->cur_speed < speed_limit) hard_limit = false;
  17.         speed_limit = v->vcache.cached_max_speed;
  18. @@ -653,8 +659,6 @@
  19.  
  20.     spd = min(v->cur_speed + (spd >> 8) + (v->subspeed < t), speed_limit);
  21.  
  22. -   /* adjust speed for broken vehicles */
  23. -   if (v->vehstatus & VS_AIRCRAFT_BROKEN) spd = min(spd, SPEED_LIMIT_BROKEN);
  24.  
  25.     /* updates statusbar only if speed have changed to save CPU time */
  26.     if (spd != v->cur_speed) {

Comments