mirror of https://github.com/OpenTTD/OpenTTD
(svn r12076) -Fix: when reusing a renamed deleted waypoint, keep the new name
parent
a187d92d87
commit
eb0d50aaff
|
@ -197,7 +197,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint3
|
||||||
|
|
||||||
wp_auto_delete = wp;
|
wp_auto_delete = wp;
|
||||||
|
|
||||||
wp->town_index = 0;
|
wp->town_index = INVALID_TOWN;
|
||||||
wp->name = NULL;
|
wp->name = NULL;
|
||||||
wp->town_cn = 0;
|
wp->town_cn = 0;
|
||||||
} else if (flags & DC_EXEC) {
|
} else if (flags & DC_EXEC) {
|
||||||
|
@ -241,7 +241,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint3
|
||||||
wp->deleted = 0;
|
wp->deleted = 0;
|
||||||
wp->build_date = _date;
|
wp->build_date = _date;
|
||||||
|
|
||||||
if (wp->town_index == 0) MakeDefaultWaypointName(wp);
|
if (wp->town_index == INVALID_TOWN) MakeDefaultWaypointName(wp);
|
||||||
|
|
||||||
UpdateWaypointSign(wp);
|
UpdateWaypointSign(wp);
|
||||||
RedrawWaypointSign(wp);
|
RedrawWaypointSign(wp);
|
||||||
|
|
Loading…
Reference in New Issue