(svn r11637) -Fix: mark viewports dirty when removing visible vehicle chain

This commit is contained in:
smatz 2007-12-15 16:11:29 +00:00
parent 46724104fe
commit 4b22e57b33
1 changed files with 5 additions and 0 deletions

View File

@ -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);