Fix redrawing/clearing of vehicle route lines.

Fix new route lines not being (fully) added in a timely manner.
Fix old lines not being (fully) removed until a scroll/zoom.
Fix the screen invalidation algorithm assuming that the terrain is
perfectly flat at at near sea level. (Use of MarkTileDirtyByTile to
clear lines which do not follow tile height contours).
This commit is contained in:
Jonathan G Rennison
2015-10-30 21:05:33 +00:00
parent 6e3b3c04de
commit 129e14d817
2 changed files with 88 additions and 8 deletions

View File

@@ -704,11 +704,12 @@ private:
/* When networking, move one order lower */
int selected = this->selected_order + (int)_networking;
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
if (DoCommandP(this->vehicle->tile, this->vehicle->index, this->OrderGetSel(), CMD_DELETE_ORDER | CMD_MSG(STR_ERROR_CAN_T_DELETE_THIS_ORDER))) {
this->selected_order = selected >= this->vehicle->GetNumOrders() ? -1 : selected;
this->UpdateButtonState();
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
}
}