From b169f89880ab2df6a79fc8093160f9dccace154e 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/waypoint.cpp') 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-54-g00ecf