summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-11-06 13:03:17 +0000
committerterkhen <terkhen@openttd.org>2010-11-06 13:03:17 +0000
commit25d1b2f54b9cac01e2737848c208f6d8096a4a92 (patch)
tree37860a84857248e929612d7ed018a4e2065d31cd /src/vehicle.cpp
parentc8a56f17f82be7d4a8e935fc514c86a313dc7d15 (diff)
downloadopenttd-25d1b2f54b9cac01e2737848c208f6d8096a4a92.tar.xz
(svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 8052a29ac..a10f0481d 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1163,6 +1163,7 @@ void VehicleEnterDepot(Vehicle *v)
SetWindowClassesDirty(WC_SHIPS_LIST);
Ship *ship = Ship::From(v);
ship->state = TRACK_BIT_DEPOT;
+ ship->UpdateCache();
ship->UpdateViewport(true, true);
SetWindowDirty(WC_VEHICLE_DEPOT, v->tile);
break;