summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/aircraft_cmd.cpp1
-rw-r--r--src/roadveh_cmd.cpp2
-rw-r--r--src/ship_cmd.cpp2
-rw-r--r--src/train_cmd.cpp2
-rw-r--r--src/vehicle.cpp1
-rw-r--r--src/vehicle_cmd.cpp1
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));