diff options
author | truelight <truelight@openttd.org> | 2006-08-26 17:34:48 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2006-08-26 17:34:48 +0000 |
commit | b7ecdc85d8b9dd3dc0de61947a490df2fcbffea4 (patch) | |
tree | 8191eef27643b8de19afd0cd3eef37dd580b147a | |
parent | 3b82b67391ee2068845c62cc373a00c7c2852b42 (diff) | |
download | openttd-b7ecdc85d8b9dd3dc0de61947a490df2fcbffea4.tar.xz |
(svn r6148) -Fix r6146: mostly it is useful to declare a variable in the function you use it (tnx Tron)
-rw-r--r-- | waypoint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/waypoint.c b/waypoint.c index 4aeb72040..4dd2baf73 100644 --- a/waypoint.c +++ b/waypoint.c @@ -88,7 +88,6 @@ static void RedrawWaypointSign(const Waypoint* wp) /* Update all signs */ void UpdateAllWaypointSigns(void) { - DestinationID dest; Waypoint *wp; FOR_ALL_WAYPOINTS(wp) { @@ -99,6 +98,8 @@ void UpdateAllWaypointSigns(void) /* Internal handler to delete a waypoint */ void DestroyWaypoint(Waypoint *wp) { + DestinationID dest; + dest.waypoint = wp->index; RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, dest); |