diff options
author | smatz <smatz@openttd.org> | 2007-12-15 16:11:29 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2007-12-15 16:11:29 +0000 |
commit | 4b22e57b3329f14fa834babf6ad101868ca859ae (patch) | |
tree | 685beba35ce7c5f5358fdebf9a7caabb8163e8f8 /src | |
parent | 46724104fe611cf6fd6baf546145fbd875bf091e (diff) | |
download | openttd-4b22e57b3329f14fa834babf6ad101868ca859ae.tar.xz |
(svn r11637) -Fix: mark viewports dirty when removing visible vehicle chain
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 693b2e269..63ffc0927 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -606,6 +606,11 @@ void DeleteVehicleChain(Vehicle *v) do { Vehicle *u = v; + if (!(v->vehstatus & VS_HIDDEN)) { + /* sometimes, eg. for disaster vehicles, when company bankrupts, when removing crashed/flooded vehicles, + * it may happen that vehicle chain is deleted when visible */ + MarkAllViewportsDirty(v->left_coord, v->top_coord, v->right_coord + 1, v->bottom_coord + 1); + } v = v->Next(); delete u; } while (v != NULL); |