waypoint.c
changeset 4527 b18634a31a4a
parent 4500 426d0baa1be5
child 4984 b16443d3ab20
equal deleted inserted replaced
4526:77ef74d28e76 4527:b18634a31a4a
    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 }