Loading

Revision differences

Old revision #pmxadixsrNew revision #pnlm7apwn
1    bool aircraft_broken = v->vehstatus & VS_AIRCRAFT_BROKEN;    
2    if (aircraft_broken) speed_limit = SPEED_LIMIT_BROKEN;    
3    
4    /* Adjust speed limits by plane speed factor to prevent taxiing  1    /* Adjust speed limits by plane speed factor to prevent taxiing  
5     * and take-off speeds being too low. */  2     * and take-off speeds being too low. */  
6    speed_limit *= _settings_game.vehicle.plane_speed;  3    speed_limit *= _settings_game.vehicle.plane_speed;  
7  4  
  5    /* adjust speed for broken vehicles */  
  6    if (v->vehstatus & VS_AIRCRAFT_BROKEN) {  
  7        if (speed_limit > SPEED_LIMIT_BROKEN && v->cur_speed > min(speed_limit, SPEED_LIMIT_BROKEN)) {  
  8            hard_limit = false;  
  9        }  
  10        speed_limit = min(speed_limit, SPEED_LIMIT_BROKEN);  
  11    }  
  12  
8    if (v->vcache.cached_max_speed < speed_limit) {  13    if (v->vcache.cached_max_speed < speed_limit) {  
9        if (v->cur_speed < aircraft_broken ? SPEED_LIMIT_BROKEN : speed_limit) hard_limit = false;  9        if (v->cur_speed < speed_limit) hard_limit = false;
10        speed_limit = aircraft_broken ? SPEED_LIMIT_BROKEN : v->vcache.cached_max_speed;  10        speed_limit = v->vcache.cached_max_speed;
11    } 16    }