(svn r12076) -Fix: when reusing a renamed deleted waypoint, keep the new name

This commit is contained in:
glx 2008-02-07 01:56:39 +00:00
parent a187d92d87
commit eb0d50aaff
1 changed files with 2 additions and 2 deletions

View File

@ -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);