diff options
author | frosch <frosch@openttd.org> | 2009-09-20 19:36:27 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-09-20 19:36:27 +0000 |
commit | 7fa4d576ca0077d45957590d25769f4fde2b2320 (patch) | |
tree | e61e9cfa2d9fd7d8b2e87869d4382fcedf126647 /src | |
parent | bbce4fba25108c929df5689da0af896828d95fa4 (diff) | |
download | openttd-7fa4d576ca0077d45957590d25769f4fde2b2320.tar.xz |
(svn r17594) -Fix: Vehicle image was not always updated when needed.
Diffstat (limited to 'src')
-rw-r--r-- | src/aircraft_cmd.cpp | 1 | ||||
-rw-r--r-- | src/roadveh_cmd.cpp | 2 | ||||
-rw-r--r-- | src/ship_cmd.cpp | 2 | ||||
-rw-r--r-- | src/train_cmd.cpp | 2 | ||||
-rw-r--r-- | src/vehicle.cpp | 1 | ||||
-rw-r--r-- | src/vehicle_cmd.cpp | 1 |
6 files changed, 9 insertions, 0 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 8038876af..b979ac8cf 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1320,6 +1320,7 @@ static void CrashAirplane(Aircraft *v) CreateEffectVehicleRel(v, 4, 4, 8, EV_EXPLOSION_LARGE); + v->MarkDirty(); SetWindowDirty(WC_VEHICLE_VIEW, v->index); uint amt = 2; diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 5a71b2abc..1132db2af 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -671,6 +671,7 @@ static void HandleBrokenRoadVeh(RoadVehicle *v) if (v->breakdowns_since_last_service != 255) v->breakdowns_since_last_service++; + v->MarkDirty(); SetWindowDirty(WC_VEHICLE_VIEW, v->index); SetWindowDirty(WC_VEHICLE_DETAILS, v->index); @@ -688,6 +689,7 @@ static void HandleBrokenRoadVeh(RoadVehicle *v) if ((v->tick_counter & 1) == 0) { if (--v->breakdown_delay == 0) { v->breakdown_ctr = 0; + v->MarkDirty(); SetWindowDirty(WC_VEHICLE_VIEW, v->index); } } diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index 7d2fd7b54..5aeebffee 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -212,6 +212,7 @@ static void HandleBrokenShip(Vehicle *v) if (v->breakdowns_since_last_service != 255) v->breakdowns_since_last_service++; + v->MarkDirty(); SetWindowDirty(WC_VEHICLE_VIEW, v->index); SetWindowDirty(WC_VEHICLE_DETAILS, v->index); @@ -229,6 +230,7 @@ static void HandleBrokenShip(Vehicle *v) if (!(v->tick_counter & 1)) { if (!--v->breakdown_delay) { v->breakdown_ctr = 0; + v->MarkDirty(); SetWindowDirty(WC_VEHICLE_VIEW, v->index); } } diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index cf95284e0..78f19a17c 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -4159,6 +4159,7 @@ static void HandleBrokenTrain(Train *v) if (v->breakdowns_since_last_service != 255) v->breakdowns_since_last_service++; + v->MarkDirty(); SetWindowDirty(WC_VEHICLE_VIEW, v->index); SetWindowDirty(WC_VEHICLE_DETAILS, v->index); @@ -4176,6 +4177,7 @@ static void HandleBrokenTrain(Train *v) if (!(v->tick_counter & 3)) { if (!--v->breakdown_delay) { v->breakdown_ctr = 0; + v->MarkDirty(); SetWindowDirty(WC_VEHICLE_VIEW, v->index); } } diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 7596d4d7b..ce94c71c9 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1645,6 +1645,7 @@ void StopAllVehicles() /* Code ripped from CmdStartStopTrain. Can't call it, because of * ownership problems, so we'll duplicate some code, for now */ v->vehstatus |= VS_STOPPED; + v->MarkDirty(); SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); SetWindowDirty(WC_VEHICLE_DEPOT, v->tile); } diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index c6f5f1750..9f1de3c44 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -107,6 +107,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, v->vehstatus ^= VS_STOPPED; if (v->type != VEH_TRAIN) v->cur_speed = 0; // trains can stop 'slowly' + v->MarkDirty(); SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); SetWindowDirty(WC_VEHICLE_DEPOT, v->tile); SetWindowClassesDirty(GetWindowClassForVehicleType(v->type)); |