summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-17 17:06:20 +0000
committertruelight <truelight@openttd.org>2004-12-17 17:06:20 +0000
commit9d05289147bd09a38babdae9171d617c7a8876c1 (patch)
tree2d0ecef0b0bc75f259358af5d514fd44236bb81a /main_gui.c
parentef89eb019a7039290b94bd97efaa79d2be941784 (diff)
downloadopenttd-9d05289147bd09a38babdae9171d617c7a8876c1.tar.xz
(svn r1146) -Fix: You can no longer change waypoints whom are owned by somebody else
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main_gui.c b/main_gui.c
index 97e516c05..1f1b01712 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -376,6 +376,13 @@ void ShowRenameSignWindow(SignStruct *ss)
void ShowRenameWaypointWindow(Waypoint *cp)
{
int id = cp - _waypoints;
+
+ /* Are we allowed to change the name of the waypoint? */
+ if (!CheckTileOwnership(cp->xy)) {
+ ShowErrorMessage(_error_message, STR_CANT_CHANGE_WAYPOINT_NAME, GET_TILE_X(cp->xy) * 16, GET_TILE_Y(cp->xy) * 16);
+ return;
+ }
+
_rename_id = id;
_rename_what = 1;
SetDParam(0, id);