Fix viewport order lines/markers for multiplayer clients.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "company_base.h"
|
||||
#include "order_backup.h"
|
||||
#include "cheat_type.h"
|
||||
#include "viewport_func.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -937,6 +938,7 @@ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
Order *new_o = new Order();
|
||||
new_o->AssignOrder(new_order);
|
||||
InsertOrder(v, new_o, sel_ord);
|
||||
CheckMarkDirtyFocusedRoutePaths(v);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
@@ -1022,6 +1024,7 @@ static CommandCost DecloneOrder(Vehicle *dst, DoCommandFlag flags)
|
||||
DeleteVehicleOrders(dst);
|
||||
InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS);
|
||||
InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
|
||||
CheckMarkDirtyFocusedRoutePaths(dst);
|
||||
}
|
||||
return CommandCost();
|
||||
}
|
||||
@@ -1052,7 +1055,10 @@ CommandCost CmdDeleteOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
|
||||
if (v->GetOrder(sel_ord) == NULL) return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) DeleteOrder(v, sel_ord);
|
||||
if (flags & DC_EXEC) {
|
||||
DeleteOrder(v, sel_ord);
|
||||
CheckMarkDirtyFocusedRoutePaths(v);
|
||||
}
|
||||
return CommandCost();
|
||||
}
|
||||
|
||||
@@ -1266,6 +1272,7 @@ CommandCost CmdMoveOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
/* Make sure to rebuild the whole list */
|
||||
InvalidateWindowClassesData(GetWindowClassForVehicleType(v->type), 0);
|
||||
CheckMarkDirtyFocusedRoutePaths(v);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
@@ -1509,6 +1516,7 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
}
|
||||
InvalidateVehicleOrder(u, VIWD_MODIFY_ORDERS);
|
||||
}
|
||||
CheckMarkDirtyFocusedRoutePaths(v);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
@@ -1621,6 +1629,7 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
InvalidateVehicleOrder(src, VIWD_MODIFY_ORDERS);
|
||||
|
||||
InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
|
||||
CheckMarkDirtyFocusedRoutePaths(dst);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1683,6 +1692,7 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
InvalidateVehicleOrder(dst, VIWD_REMOVE_ALL_ORDERS);
|
||||
|
||||
InvalidateWindowClassesData(GetWindowClassForVehicleType(dst->type), 0);
|
||||
CheckMarkDirtyFocusedRoutePaths(dst);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1745,6 +1755,7 @@ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
u->current_order.SetRefit(cargo);
|
||||
}
|
||||
}
|
||||
CheckMarkDirtyFocusedRoutePaths(v);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
|
Reference in New Issue
Block a user