(svn r21099) -Codechange: Store road vehicle max speed in the vehicle cache.

This commit is contained in:
terkhen
2010-11-06 13:05:11 +00:00
parent 25d1b2f54b
commit 18e3a3ddfc
5 changed files with 20 additions and 21 deletions

View File

@@ -1232,8 +1232,15 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
case VEH_SHIP:
t = u->vcache.cached_max_speed;
break;
case VEH_ROAD: t = u->max_speed / 2; break;
case VEH_AIRCRAFT: t = Aircraft::From(u)->GetSpeedOldUnits(); break; // Convert to old units.
case VEH_ROAD:
t = u->vcache.cached_max_speed / 2;
break;
case VEH_AIRCRAFT:
t = Aircraft::From(u)->GetSpeedOldUnits(); // Convert to old units.
break;
default: NOT_REACHED();
}