From eb0d50aaffaeac92a1ef68af7d68fc3443030814 Mon Sep 17 00:00:00 2001 From: glx Date: Thu, 7 Feb 2008 01:56:39 +0000 Subject: (svn r12076) -Fix: when reusing a renamed deleted waypoint, keep the new name --- src/waypoint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/waypoint.cpp b/src/waypoint.cpp index 04b7de41c..125a5202e 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -197,7 +197,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint3 wp_auto_delete = wp; - wp->town_index = 0; + wp->town_index = INVALID_TOWN; wp->name = NULL; wp->town_cn = 0; } else if (flags & DC_EXEC) { @@ -241,7 +241,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint3 wp->deleted = 0; wp->build_date = _date; - if (wp->town_index == 0) MakeDefaultWaypointName(wp); + if (wp->town_index == INVALID_TOWN) MakeDefaultWaypointName(wp); UpdateWaypointSign(wp); RedrawWaypointSign(wp); -- cgit v1.2.3-70-g09d2