(svn r1681) -Feature: New realistic acceleration.
This will make things more difficult as narrow curves
and depots impose rather strict speed limits. Feedback welcome
For those who don't like low-speed curves: Switch it off
This commit is contained in:
@@ -299,7 +299,20 @@ int CDECL VehicleMaxSpeedSorter(const void *a, const void *b)
|
||||
{
|
||||
const Vehicle *va = GetVehicle((*(const SortStruct*)a).index);
|
||||
const Vehicle *vb = GetVehicle((*(const SortStruct*)b).index);
|
||||
int r = va->max_speed - vb->max_speed;
|
||||
int max_speed_a = 0xFFFF, max_speed_b = 0xFFFF;
|
||||
int r;
|
||||
const Vehicle *ua = va, *ub = vb;
|
||||
do {
|
||||
if (RailVehInfo(ua->engine_type)->max_speed != 0)
|
||||
max_speed_a = min(max_speed_a, RailVehInfo(ua->engine_type)->max_speed);
|
||||
} while ((ua = ua->next) != NULL);
|
||||
|
||||
do {
|
||||
if (RailVehInfo(ub->engine_type)->max_speed != 0)
|
||||
max_speed_b = min(max_speed_b, RailVehInfo(ub->engine_type)->max_speed);
|
||||
} while ((ub = ub->next) != NULL);
|
||||
|
||||
r = max_speed_a - max_speed_b;
|
||||
|
||||
VEHICLEUNITNUMBERSORTER(r, va, vb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user