mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-27 15:39:32 +01:00
(svn r11835) -Fix: mark depot, viewports, vehicle lists and vehicle details dirty when a train crashes
This commit is contained in:
parent
dc87b05e8c
commit
8da51e5eb2
@ -2779,12 +2779,19 @@ static void SetVehicleCrashed(Vehicle *v)
|
|||||||
|
|
||||||
v->u.rail.crash_anim_pos++;
|
v->u.rail.crash_anim_pos++;
|
||||||
|
|
||||||
Vehicle *u = v;
|
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
|
||||||
|
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
|
||||||
|
|
||||||
|
if (v->u.rail.track == TRACK_BIT_DEPOT) {
|
||||||
|
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
RebuildVehicleLists();
|
||||||
|
|
||||||
BEGIN_ENUM_WAGONS(v)
|
BEGIN_ENUM_WAGONS(v)
|
||||||
v->vehstatus |= VS_CRASHED;
|
v->vehstatus |= VS_CRASHED;
|
||||||
|
MarkAllViewportsDirty(v->left_coord, v->top_coord, v->right_coord + 1, v->bottom_coord + 1);
|
||||||
END_ENUM_WAGONS(v)
|
END_ENUM_WAGONS(v)
|
||||||
|
|
||||||
InvalidateWindowWidget(WC_VEHICLE_VIEW, u->index, STATUS_BAR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint CountPassengersInTrain(const Vehicle* v)
|
static uint CountPassengersInTrain(const Vehicle* v)
|
||||||
|
Loading…
Reference in New Issue
Block a user