summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-02-07 01:56:39 +0000
committerglx <glx@openttd.org>2008-02-07 01:56:39 +0000
commiteb0d50aaffaeac92a1ef68af7d68fc3443030814 (patch)
tree52464d27d322f175ee8c853ff5c5a45e905b6205 /src
parenta187d92d876924ff39a51c492d47ec2acb24e503 (diff)
downloadopenttd-eb0d50aaffaeac92a1ef68af7d68fc3443030814.tar.xz
(svn r12076) -Fix: when reusing a renamed deleted waypoint, keep the new name
Diffstat (limited to 'src')
-rw-r--r--src/waypoint.cpp4
1 files changed, 2 insertions, 2 deletions
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);