waypoint.c
changeset 4527 fa30d19685c2
parent 4500 6bcd1f6fdc22
child 4984 f717899efa25
equal deleted inserted replaced
4526:6d48f07e829e 4527:fa30d19685c2
    96 }
    96 }
    97 
    97 
    98 /* Internal handler to delete a waypoint */
    98 /* Internal handler to delete a waypoint */
    99 void DestroyWaypoint(Waypoint *wp)
    99 void DestroyWaypoint(Waypoint *wp)
   100 {
   100 {
   101 	DestinationID dest;
   101 	RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, wp->index);
   102 
       
   103 	dest.waypoint = wp->index;
       
   104 	RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, dest);
       
   105 
   102 
   106 	if (wp->string != STR_NULL) DeleteName(wp->string);
   103 	if (wp->string != STR_NULL) DeleteName(wp->string);
   107 
   104 
   108 	RedrawWaypointSign(wp);
   105 	RedrawWaypointSign(wp);
   109 }
   106 }