(svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user