(svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time.

This commit is contained in:
terkhen
2010-11-06 13:03:17 +00:00
parent c8a56f17f8
commit 25d1b2f54b
7 changed files with 42 additions and 18 deletions

View File

@@ -717,7 +717,8 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
case 0x19: {
uint max_speed;
switch (v->type) {
case VEH_TRAIN:
case VEH_TRAIN: /* FALL THROUGH */
case VEH_SHIP:
max_speed = v->vcache.cached_max_speed;
break;