equal
deleted
inserted
replaced
766 |
766 |
767 static void DoDeleteWaypoint(Waypoint *cp) |
767 static void DoDeleteWaypoint(Waypoint *cp) |
768 { |
768 { |
769 Order order; |
769 Order order; |
770 cp->xy = 0; |
770 cp->xy = 0; |
|
771 |
771 order.type = OT_GOTO_WAYPOINT; |
772 order.type = OT_GOTO_WAYPOINT; |
772 order.flags = 0; |
|
773 order.station = cp - _waypoints; |
773 order.station = cp - _waypoints; |
774 DeleteCommandFromVehicleSchedule(order); |
774 DeleteDestinationFromVehicleOrder(order); |
|
775 |
775 if (~cp->town_or_string & 0xC000) DeleteName(cp->town_or_string); |
776 if (~cp->town_or_string & 0xC000) DeleteName(cp->town_or_string); |
776 RedrawWaypointSign(cp); |
777 RedrawWaypointSign(cp); |
777 } |
778 } |
778 |
779 |
779 // delete waypoints after a while |
780 // delete waypoints after a while |