summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-07-14 12:20:48 +0000
committerterkhen <terkhen@openttd.org>2010-07-14 12:20:48 +0000
commit8858729ae79135592ccc8c1babf3321587167a70 (patch)
tree4b83d74aa3ac6d2f7524699f45cbc1f87bd530ce /src
parent88830a24ecdbd5995c71d28cce91fa8345c23278 (diff)
downloadopenttd-8858729ae79135592ccc8c1babf3321587167a70.tar.xz
(svn r20142) -Fix [FS#3880]: Ships were not marked as dirty when stopping inside a depot.
Diffstat (limited to 'src')
-rw-r--r--src/vehicle.cpp9
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);