summaryrefslogtreecommitdiff
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
commitb169f89880ab2df6a79fc8093160f9dccace154e (patch)
tree52464d27d322f175ee8c853ff5c5a45e905b6205
parentb19704f66180bba2889a952952501b5ea134d8f5 (diff)
downloadopenttd-b169f89880ab2df6a79fc8093160f9dccace154e.tar.xz
(svn r12076) -Fix: when reusing a renamed deleted waypoint, keep the new name
-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);