Index: src/strings.cpp =================================================================== --- src/strings.cpp (revision 19939) +++ src/strings.cpp (working copy) @@ -516,24 +516,24 @@ /* Unit conversions */ static const Units units[] = { - { // Imperial (Original, mph, hp, metric ton, litre, kN) - 1, 0, STR_UNITS_VELOCITY_IMPERIAL, + { // Imperial (Original, mph, hp, metric ton, litre, kN, ft) + 10, 4, STR_UNITS_VELOCITY_IMPERIAL, 1, 0, STR_UNITS_POWER_IMPERIAL, 1, 0, STR_UNITS_WEIGHT_SHORT_METRIC, STR_UNITS_WEIGHT_LONG_METRIC, 1000, 0, STR_UNITS_VOLUME_SHORT_METRIC, STR_UNITS_VOLUME_LONG_METRIC, 1, 0, STR_UNITS_FORCE_SI, 3, 0, STR_UNITS_HEIGHT_IMPERIAL, }, - { // Metric (km/h, hp, metric ton, litre, kN) - 103, 6, STR_UNITS_VELOCITY_METRIC, + { // Metric (km/h, hp, metric ton, litre, kN, metre) + 1, 0, STR_UNITS_VELOCITY_METRIC, 1, 0, STR_UNITS_POWER_METRIC, 1, 0, STR_UNITS_WEIGHT_SHORT_METRIC, STR_UNITS_WEIGHT_LONG_METRIC, 1000, 0, STR_UNITS_VOLUME_SHORT_METRIC, STR_UNITS_VOLUME_LONG_METRIC, 1, 0, STR_UNITS_FORCE_SI, 1, 0, STR_UNITS_HEIGHT_SI, }, - { // SI (m/s, kilowatt, kilogram, cubic metres, kilonewton) - 1831, 12, STR_UNITS_VELOCITY_SI, + { // SI (m/s, kilowatt, kilogram, cubic metre, kilonewton, metre) + 284, 10, STR_UNITS_VELOCITY_SI, 764, 10, STR_UNITS_POWER_SI, 1000, 0, STR_UNITS_WEIGHT_SHORT_SI, STR_UNITS_WEIGHT_LONG_SI, 1, 0, STR_UNITS_VOLUME_SHORT_SI, STR_UNITS_VOLUME_LONG_SI, @@ -613,7 +613,7 @@ case SCC_VELOCITY: { // {VELOCITY} int64 args[1]; assert(_settings_game.locale.units < lengthof(units)); - args[0] = ConvertSpeedToDisplaySpeed(GetInt32(&argv) * 10 / 16); + args[0] = ConvertSpeedToDisplaySpeed(GetInt32(&argv)); buff = FormatString(buff, GetStringPtr(units[_settings_game.locale.units].velocity), args, modifier >> 24, last); modifier = 0; break; Index: src/order_cmd.cpp =================================================================== --- src/order_cmd.cpp (revision 19939) +++ src/order_cmd.cpp (working copy) @@ -1689,14 +1689,14 @@ switch (order->GetConditionVariable()) { case OCV_LOAD_PERCENTAGE: skip_order = OrderConditionCompare(occ, CalcPercentVehicleFilled(v, NULL), value); break; case OCV_RELIABILITY: skip_order = OrderConditionCompare(occ, ToPercent16(v->reliability), value); break; - case OCV_MAX_SPEED: skip_order = OrderConditionCompare(occ, v->GetDisplayMaxSpeed() * 10 / 16, value); break; + case OCV_MAX_SPEED: skip_order = OrderConditionCompare(occ, v->GetDisplayMaxSpeed(), value); break; case OCV_AGE: skip_order = OrderConditionCompare(occ, v->age / DAYS_IN_LEAP_YEAR, value); break; case OCV_REQUIRES_SERVICE: skip_order = OrderConditionCompare(occ, v->NeedsServicing(), value); break; case OCV_UNCONDITIONALLY: skip_order = true; break; default: NOT_REACHED(); } - return skip_order ? order->GetConditionSkipToOrder() : (VehicleOrderID)INVALID_VEH_ORDER_ID; + return skip_order ? order->GetConditionSkipToOrder() : INVALID_VEH_ORDER_ID; } /** Index: src/saveload/afterload.cpp =================================================================== --- src/saveload/afterload.cpp (revision 19939) +++ src/saveload/afterload.cpp (working copy) @@ -2116,6 +2116,15 @@ FOR_ALL_DEPOTS(d) d->town_cn = UINT16_MAX; FOR_ALL_DEPOTS(d) MakeDefaultName(d); + + /* The condition value for the condition variable max speed is + * now in kph, it used to be mph. */ + Order *o; + FOR_ALL_ORDERS(o) { + if (o->IsType(OT_CONDITIONAL) && (o->GetConditionVariable() == OCV_MAX_SPEED)) { + o->SetConditionValue(o->GetConditionValue() * 16 / 10); + } + } } /* Road stops is 'only' updating some caches */