Merge branch 'enhanced_viewport_overlay' into jgrpp

Further fixes for viewport lines/marker for multiplayer clients.

# Conflicts:
#	src/lang/russian.txt
This commit is contained in:
Jonathan G Rennison
2016-12-26 15:38:56 +00:00
22 changed files with 402 additions and 341 deletions

View File

@@ -156,7 +156,7 @@ public:
~CargoTypeOrdersWindow()
{
if (!FocusWindowById(WC_VEHICLE_ORDERS, this->window_number)) {
MarkAllRouteStepsDirty(this);
MarkAllRouteStepsDirty(this->vehicle);
}
}
@@ -253,7 +253,7 @@ public:
{
if (HasFocusedVehicleChanged(this->window_number, previously_focused_window)) {
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
MarkAllRouteStepsDirty(this->vehicle);
}
}
@@ -261,7 +261,7 @@ public:
{
if (HasFocusedVehicleChanged(this->window_number, newly_focused_window)) {
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
MarkAllRouteStepsDirty(this->vehicle);
}
}
};
@@ -1120,8 +1120,6 @@ private:
order.SetDepotActionType(ODATFB_NEAREST_DEPOT);
DoCommandP(this->vehicle->tile, this->vehicle->index + (this->OrderGetSel() << 20), order.Pack(), CMD_INSERT_ORDER | CMD_MSG(STR_ERROR_CAN_T_INSERT_NEW_ORDER));
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
}
/**
@@ -1211,12 +1209,9 @@ private:
/* When networking, move one order lower */
int selected = this->selected_order + (int)_networking;
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);
}
}
@@ -1315,7 +1310,7 @@ public:
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_LOAD_ORDERS, this->window_number, false);
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_UNLOAD_ORDERS, this->window_number, false);
if (!FocusWindowById(WC_VEHICLE_VIEW, this->window_number)) {
MarkAllRouteStepsDirty(this);
MarkAllRouteStepsDirty(this->vehicle);
}
}
@@ -1774,8 +1769,6 @@ public:
order.MakeConditional(order_id);
DoCommandP(this->vehicle->tile, this->vehicle->index + (this->OrderGetSel() << 20), order.Pack(), CMD_INSERT_ORDER | CMD_MSG(STR_ERROR_CAN_T_INSERT_NEW_ORDER));
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
}
ResetObjectToPlace();
break;
@@ -2035,8 +2028,6 @@ public:
DoCommandP(this->vehicle->tile, this->vehicle->index, from_order | (to_order << 16), CMD_MOVE_ORDER | CMD_MSG(STR_ERROR_CAN_T_MOVE_THIS_ORDER))) {
this->selected_order = -1;
this->UpdateButtonState();
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
}
break;
}
@@ -2087,8 +2078,6 @@ public:
if (cmd.IsType(OT_NOTHING)) return;
if (DoCommandP(this->vehicle->tile, this->vehicle->index + (this->OrderGetSel() << 20), cmd.Pack(), CMD_INSERT_ORDER | CMD_MSG(STR_ERROR_CAN_T_INSERT_NEW_ORDER))) {
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
/* With quick goto the Go To button stays active */
if (!_settings_client.gui.quick_goto) ResetObjectToPlace();
}
@@ -2109,8 +2098,6 @@ public:
share_order ? CMD_CLONE_ORDER | CMD_MSG(STR_ERROR_CAN_T_SHARE_ORDER_LIST) : CMD_CLONE_ORDER | CMD_MSG(STR_ERROR_CAN_T_COPY_ORDER_LIST))) {
this->selected_order = -1;
ResetObjectToPlace();
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
}
return true;
}
@@ -2157,7 +2144,7 @@ public:
{
if (HasFocusedVehicleChanged(this->window_number, previously_focused_window)) {
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
MarkAllRouteStepsDirty(this->vehicle);
}
}
@@ -2165,7 +2152,7 @@ public:
{
if (HasFocusedVehicleChanged(this->window_number, newly_focused_window)) {
MarkAllRoutePathsDirty(this->vehicle);
MarkAllRouteStepsDirty(this);
MarkAllRouteStepsDirty(this->vehicle);
}
}