(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

@@ -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;