diff options
author | terkhen <terkhen@openttd.org> | 2010-07-14 12:20:48 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-07-14 12:20:48 +0000 |
commit | 8858729ae79135592ccc8c1babf3321587167a70 (patch) | |
tree | 4b83d74aa3ac6d2f7524699f45cbc1f87bd530ce | |
parent | 88830a24ecdbd5995c71d28cce91fa8345c23278 (diff) | |
download | openttd-8858729ae79135592ccc8c1babf3321587167a70.tar.xz |
(svn r20142) -Fix [FS#3880]: Ships were not marked as dirty when stopping inside a depot.
-rw-r--r-- | src/vehicle.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 178596a4f..963f3a042 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1072,11 +1072,14 @@ void VehicleEnterDepot(Vehicle *v) SetWindowClassesDirty(WC_ROADVEH_LIST); break; - case VEH_SHIP: + case VEH_SHIP: { SetWindowClassesDirty(WC_SHIPS_LIST); - Ship::From(v)->state = TRACK_BIT_DEPOT; - RecalcShipStuff(Ship::From(v)); + Ship *ship = Ship::From(v); + ship->state = TRACK_BIT_DEPOT; + ship->UpdateViewport(true, true); + SetWindowDirty(WC_VEHICLE_DEPOT, v->tile); break; + } case VEH_AIRCRAFT: SetWindowClassesDirty(WC_AIRCRAFT_LIST); |