rail_cmd.c
changeset 1024 5e446b5b3ec5
parent 1009 75140dc68759
child 1035 812f837ee03f
equal deleted inserted replaced
1023:1ae7b7a78602 1024:5e446b5b3ec5
   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