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 | 87d2c032556dfabba40445c7e29145e603760800 (patch) | |
tree | 8191eef27643b8de19afd0cd3eef37dd580b147a | |
parent | 8dcae588e82ffecff76b02c9a243c407dcb8d78c (diff) | |
download | openttd-87d2c032556dfabba40445c7e29145e603760800.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); |